From 3960c7d32e0df4c16e4322e25a32961a67d99cae Mon Sep 17 00:00:00 2001 From: myT <> Date: Mon, 22 May 2023 02:16:56 +0200 Subject: [PATCH] fixed NDP executing end-of-demo commands when starting playback --- code/client/cl_demo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/client/cl_demo.cpp b/code/client/cl_demo.cpp index c802a34..e54c803 100644 --- a/code/client/cl_demo.cpp +++ b/code/client/cl_demo.cpp @@ -1055,6 +1055,9 @@ after_parse: // CGame will also restore previous state when videoRestart is qtrue CL_CGNDP_EndAnalysis(clc.demoName, demo.firstServerTime, demo.lastServerTime, videoRestart); + // make sure we don't execute commands from the end of the demo when starting up + demo.numCommands = 0; + const int duration = Sys_Milliseconds() - startTime; Com_Printf("New Demo Player: loaded demo in %d.%03d seconds\n", duration / 1000, duration % 1000); Com_DPrintf("New Demo Player: I-frame delay %d ms, %s -> %s (%.2fx)\n",