From 5e60f277e9717ac7dcf03e1b276848655f4afa07 Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Tue, 15 Feb 2022 15:14:42 +0100 Subject: [PATCH] Add demo_append to WT/CE part of the "RT" packet handler. (#649) * Add demo_append to WT/CE part of the "RT" packet handler. * Fix indentation + put demo recording outside the if else chain --- src/packet_distribution.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp index e860bf9..ac319ef 100644 --- a/src/packet_distribution.cpp +++ b/src/packet_distribution.cpp @@ -424,12 +424,11 @@ void AOApplication::server_packet_received(AOPacket *p_packet) if (f_contents.size() < 1) goto end; if (courtroom_constructed) { - if (f_contents.size() == 1) - w_courtroom->handle_wtce(f_contents.at(0), 0); - else if (f_contents.size() == 2) { - w_courtroom->handle_wtce(f_contents.at(0), f_contents.at(1).toInt()); - append_to_demofile(f_packet_encoded); - } + if (f_contents.size() == 1) + w_courtroom->handle_wtce(f_contents.at(0), 0); + else if (f_contents.size() == 2) + w_courtroom->handle_wtce(f_contents.at(0), f_contents.at(1).toInt()); + append_to_demofile(f_packet_encoded); } } else if (header == "HP") {