aboutsummaryrefslogtreecommitdiff
path: root/src/packet_distribution.cpp
diff options
context:
space:
mode:
authorstonedDiscord <stoned@derpymail.org>2020-03-15 17:06:22 +0100
committerGitHub <noreply@github.com>2020-03-15 17:06:22 +0100
commitac31da6b146edfca64e8500ea113dd0e5dbae6d4 (patch)
tree0376cfb6de028cb7b7aa356c96bb3bd610cb7ea9 /src/packet_distribution.cpp
parent4b0110d96cb3ad383d8ca517faa3c5235bed21df (diff)
parentdd2daf55f3d987fddb47a5afd269eaf00a674b8d (diff)
Merge pull request #104 from Crystalwarrior/music_list_update
Allow servers to send area list and music list refresh requests
Diffstat (limited to 'src/packet_distribution.cpp')
-rw-r--r--src/packet_distribution.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp
index 9f072ae..b14cd57 100644
--- a/src/packet_distribution.cpp
+++ b/src/packet_distribution.cpp
@@ -515,11 +515,14 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
send_server_packet(new AOPacket("RM#%"));
}
- else if (header == "SM")
+ else if (header == "SM" || header == "FM")
{
if (!courtroom_constructed)
goto end;
+ w_courtroom->clear_music();
+ w_courtroom->clear_areas();
+
bool musiclist_start = false;
area_count = 0;
@@ -543,8 +546,8 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
}
}
QThreadPool::globalInstance()->waitForDone();
-
- send_server_packet(new AOPacket("RD#%"));
+ if (header == "SM")
+ send_server_packet(new AOPacket("RD#%"));
}
else if (header == "DONE")
{