From: res Date: Fri, 4 Jan 2008 18:06:31 +0000 (+0000) Subject: Changing passing of key event ASCII codes to CSQC to use an additional function argum... X-Git-Tag: xonotic-v0.1.0preview~2596 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eac136f938e6f6fb67832619c79ca3769e0b51c1;p=xonotic%2Fdarkplaces.git Changing passing of key event ASCII codes to CSQC to use an additional function argument for CSQC_InputEvent instead of a global. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7900 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/csprogs.c b/csprogs.c index 2b7e10de..ada3b073 100644 --- a/csprogs.c +++ b/csprogs.c @@ -244,8 +244,7 @@ qboolean CL_VM_InputEvent (qboolean down, int key, int ascii) prog->globals.client->time = cl.time; PRVM_G_FLOAT(OFS_PARM0) = !down; // 0 is down, 1 is up PRVM_G_FLOAT(OFS_PARM1) = key; - if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.input_ascii))) - val->_float = ascii; + PRVM_G_FLOAT(OFS_PARM2) = ascii; PRVM_ExecuteProgram(prog->funcoffsets.CSQC_InputEvent, "QC function CSQC_InputEvent is missing"); r = CSQC_RETURNVAL; } diff --git a/progsvm.h b/progsvm.h index 178f3d81..9c907fed 100644 --- a/progsvm.h +++ b/progsvm.h @@ -252,7 +252,6 @@ typedef struct prvm_prog_globaloffsets_s int dmg_origin; // csqc int sb_showscores; // csqc int drawfont; // csqc / menu - int input_ascii; // csqc } prvm_prog_globaloffsets_t; diff --git a/prvm_edict.c b/prvm_edict.c index 04a01790..f752f9e7 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -1463,7 +1463,6 @@ void PRVM_FindOffsets(void) prog->globaloffsets.dmg_origin = PRVM_ED_FindGlobalOffset("dmg_origin"); prog->globaloffsets.sb_showscores = PRVM_ED_FindGlobalOffset("sb_showscores"); prog->globaloffsets.drawfont = PRVM_ED_FindGlobalOffset("drawfont"); - prog->globaloffsets.input_ascii = PRVM_ED_FindGlobalOffset("input_ascii"); // menu qc only uses some functions, nothing else prog->funcoffsets.m_draw = PRVM_ED_FindFunctionOffset("m_draw");