mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 05:41:52 +00:00
fix .maxspeed and .gravity with ssqc's runstandardplayerphysics
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4784 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2a65ebee65
commit
2fa7606774
2 changed files with 13 additions and 2 deletions
|
@ -8709,6 +8709,16 @@ static void QCBUILTIN PF_runclientphys(pubprogfuncs_t *prinst, struct globalvars
|
||||||
VectorCopy(ent->v->mins, pmove.player_mins);
|
VectorCopy(ent->v->mins, pmove.player_mins);
|
||||||
VectorCopy(ent->xv->gravitydir, pmove.gravitydir);
|
VectorCopy(ent->xv->gravitydir, pmove.gravitydir);
|
||||||
|
|
||||||
|
//update entity-specific stuff
|
||||||
|
movevars.entgravity = sv_gravity.value/movevars.gravity;
|
||||||
|
if (ent->xv->gravity)
|
||||||
|
movevars.entgravity *= ent->xv->gravity;
|
||||||
|
movevars.maxspeed = ent->xv->maxspeed?ent->xv->maxspeed:sv_maxspeed.value;
|
||||||
|
#ifdef HEXEN2
|
||||||
|
if (ent->xv->hasted)
|
||||||
|
movevars.maxspeed *= ent->xv->hasted;
|
||||||
|
#endif
|
||||||
|
|
||||||
pmove.numtouch = 0;
|
pmove.numtouch = 0;
|
||||||
pmove.world = &sv.world;
|
pmove.world = &sv.world;
|
||||||
pmove.skipent = -1;
|
pmove.skipent = -1;
|
||||||
|
|
|
@ -6162,8 +6162,9 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean recurse)
|
||||||
movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60;
|
movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60;
|
||||||
movevars.flyfriction = *pm_flyfriction.string?pm_flyfriction.value:4;
|
movevars.flyfriction = *pm_flyfriction.string?pm_flyfriction.value:4;
|
||||||
|
|
||||||
if (sv_player->xv->hasted)
|
// should already be folded into host_client->maxspeed
|
||||||
movevars.maxspeed*=sv_player->xv->hasted;
|
// if (sv_player->xv->hasted)
|
||||||
|
// movevars.maxspeed*=sv_player->xv->hasted;
|
||||||
|
|
||||||
for (i=0 ; i<3 ; i++)
|
for (i=0 ; i<3 ; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue