]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
csqc_progname: only reset if it matches the current progname
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 8 Jan 2016 11:15:29 +0000 (22:15 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 8 Jan 2016 11:15:29 +0000 (22:15 +1100)
qcsrc/client/main.qc

index 18eebc4cb22c78e97c255119ddc9285e87bda375..7a7b6c239e6fa8820ba2a2670759450e7aaff688 100644 (file)
@@ -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);