Merge pull request #35 from AttorneyOnline/music-stoppage

properly support music stopping
This commit is contained in:
scatterflower 2021-03-14 21:06:14 -05:00 committed by GitHub
commit 27375ffa84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -220,8 +220,13 @@ void AOClient::pktChangeMusic(AreaData* area, int argc, QStringList argv, AOPack
effects = argv[3];
else
effects = "0";
AOPacket music_change("MC", {song, argv[1], showname, "1", "0", effects});
area->current_music = song;
QString final_song;
if (!argument.contains("."))
final_song = "~stop.mp3";
else
final_song = argument;
AOPacket music_change("MC", {final_song, argv[1], showname, "1", "0", effects});
area->current_music = final_song;
area->music_played_by = showname;
server->broadcast(music_change, current_area);
return;