X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fview.qc;h=66587e11144e70d64eeecb41680b2c18e718a1e6;hb=b35562aab95e8f1c0cfafda7bd35271180160acc;hp=8b13146633c81e10c3b42712f0ecf3cb13eb22b3;hpb=07800238e2f88c9bd663e87a1097bf68202f6107;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 8b1314663..66587e111 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1710,7 +1710,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; } }