aboutsummaryrefslogtreecommitdiff
path: root/src/packet_distribution.cpp
diff options
context:
space:
mode:
authorSalanto <62221668+Salanto@users.noreply.github.com>2024-08-03 11:39:29 +0200
committerGitHub <noreply@github.com>2024-08-03 11:39:29 +0200
commit6a44e09f058cb1211406507df37508fcf1a7e126 (patch)
tree0ac93f1dee26f71f9ca0be5fce1756015a650f13 /src/packet_distribution.cpp
parentac673099e0fdadd46453762d811bc3098408ebc5 (diff)
Fix crash in demos due to PU not being recorded (#1032)
Added some guards due to bad demo files being shared by now
Diffstat (limited to 'src/packet_distribution.cpp')
-rw-r--r--src/packet_distribution.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp
index 6509900c..6cf5c74f 100644
--- a/src/packet_distribution.cpp
+++ b/src/packet_distribution.cpp
@@ -689,6 +689,11 @@ void AOApplication::server_packet_received(AOPacket packet)
PlayerRegister update{content.at(0).toInt(), PlayerRegister::REGISTER_TYPE(content.at(1).toInt())};
w_courtroom->playerList()->registerPlayer(update);
+
+ if (log_to_demo)
+ {
+ append_to_demofile(packet.toString(true));
+ }
}
else if (header == "PU")
{