From 6a44e09f058cb1211406507df37508fcf1a7e126 Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Sat, 3 Aug 2024 11:39:29 +0200 Subject: Fix crash in demos due to PU not being recorded (#1032) Added some guards due to bad demo files being shared by now --- src/packet_distribution.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/packet_distribution.cpp') 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") { -- cgit