From: havoc Date: Mon, 9 May 2011 15:44:40 +0000 (+0000) Subject: added pmove_onground to get this value from the engine prediction X-Git-Tag: xonotic-v0.6.0~163^2~403 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e0d72a97bea6a4f2af3bf0fffefe428650bac8b4;p=xonotic%2Fdarkplaces.git added pmove_onground to get this value from the engine prediction 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 --- diff --git a/csprogs.c b/csprogs.c index e17d45fc..ea2471e4 100644 --- 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"}, diff --git a/progsvm.h b/progsvm.h index e4f8e12d..0f81f292 100644 --- 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 diff --git a/prvm_edict.c b/prvm_edict.c index ed7701d4..7aa2dae0 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -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");