From: cloudwalk Date: Sat, 28 Nov 2020 16:08:20 +0000 (+0000) Subject: csprogs: Pass menu/focus state as a third parameter to CSQC_UpdateView X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=66994a596c89b53c9d78566b4022cc9cf6e1f1a6;p=xonotic%2Fdarkplaces.git csprogs: Pass menu/focus state as a third parameter to CSQC_UpdateView https://gitlab.com/xonotic/darkplaces/-/merge_requests/106 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13047 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/csprogs.c b/csprogs.c index 94e3b9d0..f5d3f9ea 100644 --- a/csprogs.c +++ b/csprogs.c @@ -487,9 +487,16 @@ qbool CL_VM_UpdateView (double frametime) prog->polygonbegin_guess2d = false; // free memory for resources that are no longer referenced PRVM_GarbageCollection(prog); - // pass in width and height as parameters (EXT_CSQC_1) + // pass in width and height and menu/focus state as parameters (EXT_CSQC_1) PRVM_G_FLOAT(OFS_PARM0) = vid.width; PRVM_G_FLOAT(OFS_PARM1) = vid.height; + /* + * This should be fine for now but FTEQW uses flags for keydest + * and checks that an array called "eyeoffset" is 0 + * + * Just a note in case there's compatibility problems later + */ + PRVM_G_FLOAT(OFS_PARM2) = key_dest == key_game; prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_UpdateView), "QC function CSQC_UpdateView is missing"); //VectorCopy(oldangles, cl.viewangles); // Dresk : Reset Dmg Globals Here