]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Merge branch 'master' into develop
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index 855d20f818fbf7d04028cd255ec5067f42ab25f8..7183d80c8be432be81153e230e98e58c0f110cdf 100644 (file)
@@ -1647,7 +1647,12 @@ void CSQC_UpdateView(entity this, float w, float h)
        {
                if(calledhooks & HOOK_START)
                {
+                       int gamecount = cvar("cl_matchcount");
                        localcmd("\ncl_hook_gameend\n");
+                       // NOTE: using localcmd here to ensure it's executed AFTER cl_hook_gameend
+                       // earlier versions of the game abuse the hook to set this cvar
+                       localcmd(strcat("cl_matchcount ", itos(gamecount + 1), "\n"));
+                       //cvar_set("cl_matchcount", itos(gamecount + 1));
                        calledhooks |= HOOK_END;
                }
        }