Merge pull request #496 from AttorneyOnline/fix/demos-fix

Fix demos being recorded with incorrect timing. ⚠HUGE, VERY IMPORTANT FIX⚠
This commit is contained in:
oldmud0 2021-03-20 12:47:38 -05:00 committed by GitHub
commit 8ba03150f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,11 +110,11 @@ void AOApplication::append_to_demofile(QString packet_string)
if (get_auto_logging_enabled() && !log_filename.isEmpty()) if (get_auto_logging_enabled() && !log_filename.isEmpty())
{ {
QString path = log_filename.left(log_filename.size()).replace(".log", ".demo"); QString path = log_filename.left(log_filename.size()).replace(".log", ".demo");
append_to_file(packet_string, path, true);
if (!demo_timer.isValid()) if (!demo_timer.isValid())
demo_timer.start(); demo_timer.start();
else else
append_to_file("wait#"+ QString::number(demo_timer.restart()) + "#%", path, true); append_to_file("wait#"+ QString::number(demo_timer.restart()) + "#%", path, true);
append_to_file(packet_string, path, true);
} }
} }