]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Changing passing of key event ASCII codes to CSQC to use an additional function argum...
authorres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 4 Jan 2008 18:06:31 +0000 (18:06 +0000)
committerres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 4 Jan 2008 18:06:31 +0000 (18:06 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7900 d7cf8633-e32d-0410-b094-e92efae38249

csprogs.c
progsvm.h
prvm_edict.c

index 2b7e10de88000798f0eb46c1d24f5ad8d749bbdf..ada3b073b486425d18942ca5abd926bcff4f86df 100644 (file)
--- 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;
                }
index 178f3d815722f98e1a12cc875357f58bb0268046..9c907feddcf7aa287cd0ec8d05ea113b3a5af244 100644 (file)
--- 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;
 
index 04a01790610f5a9ad2cf139b39aa2fc58364cd6b..f752f9e743f3d7116e1d022088719bca0569ccce 100644 (file)
@@ -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");