From 82a53826a9aceb90bb64887938f6074761b69dd6 Mon Sep 17 00:00:00 2001 From: in1tiate Date: Sun, 14 Mar 2021 20:35:07 -0500 Subject: [PATCH] properly support music stopping --- src/packets.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/packets.cpp b/src/packets.cpp index 9cfc22a..b0cf50d 100644 --- a/src/packets.cpp +++ b/src/packets.cpp @@ -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;