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
This commit is contained in:
Salanto 2022-02-15 15:14:42 +01:00 committed by GitHub
parent 2748a954f4
commit 5e60f277e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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") {