aboutsummaryrefslogtreecommitdiff
path: root/src/packet_distribution.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-09-24 00:38:26 +0300
committerCrystalwarrior <varsash@gmail.com>2019-09-24 00:38:26 +0300
commitd8857aa2e48c89a5002f8511ce566df9c557598e (patch)
tree2602b05ad3ec0bc0300bff5e068bda46fe5c3c50 /src/packet_distribution.cpp
parent398f37794facc239153a8c21e0630d2eb7850739 (diff)
When the background is changed, display it in the correct position as dictated by the server packets
Add a new "set pos" packet Udpate the pos dropdown according to the current pos
Diffstat (limited to 'src/packet_distribution.cpp')
-rw-r--r--src/packet_distribution.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp
index e483ef91..75598405 100644
--- a/src/packet_distribution.cpp
+++ b/src/packet_distribution.cpp
@@ -594,7 +594,19 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
goto end;
if (courtroom_constructed)
+ {
+ if (f_contents.size() >= 2) //We have a pos included in the background packet!
+ w_courtroom->set_side(f_contents.at(1));
w_courtroom->set_background(f_contents.at(0));
+ }
+ }
+ else if (header == "SP")
+ {
+ if (f_contents.size() < 1)
+ goto end;
+
+ if (courtroom_constructed) //We were sent a "set position" packet
+ w_courtroom->set_side(f_contents.at(0));
}
//server accepting char request(CC) packet
else if (header == "PV")