From: TimePath Date: Fri, 8 Jan 2016 11:15:29 +0000 (+1100) Subject: csqc_progname: only reset if it matches the current progname X-Git-Tag: xonotic-v0.8.2~1260 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e064a71f691b51cef431dfd7bf7432ec682f05c9;p=xonotic%2Fxonotic-data.pk3dir.git csqc_progname: only reset if it matches the current progname --- 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);