From e064a71f691b51cef431dfd7bf7432ec682f05c9 Mon Sep 17 00:00:00 2001 From: TimePath Date: Fri, 8 Jan 2016 22:15:29 +1100 Subject: [PATCH] csqc_progname: only reset if it matches the current progname --- qcsrc/client/main.qc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 18eebc4cb..7a7b6c239 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -131,13 +131,16 @@ void CSQC_Init() // CSQC_Shutdown : Called every time the CSQC code is shutdown (changing maps, quitting, etc) void Shutdown() { - // Reset csqc_progname changes here to keep listen servers working - // The engine should do this, but doesn't - string csqc_progname_prev = "csprogs.dat"; - if (fexists(csqc_progname_prev)) - cvar_set("csqc_progname", csqc_progname_prev); - else - LOG_WARNING("Don't know what to reset csqc_progname to"); + if (cvar_string("csqc_progname") == "csprogs-" WATERMARK ".dat") + { + // Reset csqc_progname changes here to keep listen servers working + // The engine should do this, but doesn't + string csqc_progname_prev = "csprogs.dat"; + if (fexists(csqc_progname_prev)) + cvar_set("csqc_progname", csqc_progname_prev); + else + LOG_WARNING("Don't know what to reset csqc_progname to"); + } WarpZone_Shutdown(); remove(teams); -- 2.39.2