]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
added pmove_onground to get this value from the engine prediction
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 9 May 2011 15:44:40 +0000 (15:44 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 14 May 2011 13:08:18 +0000 (15:08 +0200)
added pmove_inwater to get this value from the engine prediction

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11143 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=e0d72a97bea6a4f2af3bf0fffefe428650bac8b4

csprogs.c
progsvm.h
prvm_edict.c

index e17d45fccef64f32cf027555df173c19fd70af4b..ea2471e4415929d6785345c70d7ea16b8e5c2e62 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -101,6 +101,8 @@ static void CSQC_SetGlobals (void)
                // completely replacing it
                Matrix4x4_OriginFromMatrix(&cl.entities[cl.viewentity].render.matrix, prog->globals.client->pmove_org);
                VectorCopy(cl.movement_velocity, prog->globals.client->pmove_vel);
+               PRVM_GLOBALFIELDFLOAT(prog->globaloffsets.pmove_onground) = cl.onground;
+               PRVM_GLOBALFIELDFLOAT(prog->globaloffsets.pmove_inwater) = cl.inwater;
 
                VectorCopy(cl.viewangles, PRVM_GLOBALFIELDVECTOR(prog->globaloffsets.view_angles));
                VectorCopy(cl.punchangle, PRVM_GLOBALFIELDVECTOR(prog->globaloffsets.view_punchangle));
@@ -884,6 +886,8 @@ prvm_required_field_t cl_reqglobals[] =
        {ev_float, "particle_velocityjitter"},
        {ev_float, "particles_alphamax"},
        {ev_float, "particles_alphamin"},
+       {ev_float, "pmove_onground"},
+       {ev_float, "pmove_inwater"},
        {ev_float, "require_spawnfunc_prefix"},
        {ev_float, "sb_showscores"},
        {ev_float, "serverdeltatime"},
index e4f8e12d0e0c1dbe36ade64115390202b2e59320..0f81f292b1fa033be2a0fe266f2ccd2148b260b7 100644 (file)
--- a/progsvm.h
+++ b/progsvm.h
@@ -347,6 +347,8 @@ typedef struct prvm_prog_globaloffsets_s
        int sb_showscores; // csqc
        int drawfont; // csqc / menu
        int drawfontscale; // csqc / menu
+       int pmove_onground; // csqc
+       int pmove_inwater; // csqc
        int require_spawnfunc_prefix; // ssqc
        int worldstatus; // ssqc
        int servertime; // csqc
index ed7701d4a046618d146d61fb82ee3d5d4409b90c..7aa2dae0b2e493c7ef7b2eb4f6cc0692d976a230 100644 (file)
@@ -1748,6 +1748,8 @@ void PRVM_FindOffsets(void)
        prog->globaloffsets.particles_alphamax            = PRVM_ED_FindGlobalOffset("particles_alphamax");
        prog->globaloffsets.particles_colormin            = PRVM_ED_FindGlobalOffset("particles_colormin");
        prog->globaloffsets.particles_colormax            = PRVM_ED_FindGlobalOffset("particles_colormax");
+       prog->globaloffsets.pmove_onground                = PRVM_ED_FindGlobalOffset("pmove_onground");
+       prog->globaloffsets.pmove_inwater                 = PRVM_ED_FindGlobalOffset("pmove_inwater");
 
        // menu qc only uses some functions, nothing else
        prog->funcoffsets.m_draw                          = PRVM_ED_FindFunctionOffset("m_draw");