From: havoc Date: Fri, 19 Sep 2003 19:44:00 +0000 (+0000) Subject: added some SV_CheckVelocity calls to MOVETYPE_WALK code X-Git-Tag: xonotic-v0.1.0preview~6375 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=1375477193afe06d03e0605ffc796db6cb509800;p=xonotic%2Fdarkplaces.git added some SV_CheckVelocity calls to MOVETYPE_WALK code git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3470 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_phys.c b/sv_phys.c index 83ba3545..f592b08e 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -966,6 +966,8 @@ void SV_WalkMove (edict_t *ent) vec3_t upmove, downmove, oldorg, oldvel, nosteporg, nostepvel, stepnormal; trace_t downtrace; + SV_CheckVelocity(ent); + // do a regular slide move unless it looks like you ran into a step oldonground = (int)ent->v->flags & FL_ONGROUND; ent->v->flags = (int)ent->v->flags & ~FL_ONGROUND; @@ -975,6 +977,8 @@ void SV_WalkMove (edict_t *ent) clip = SV_FlyMove (ent, sv.frametime, NULL); + SV_CheckVelocity(ent); + // if move didn't block on a step, return if ( !(clip & 2) ) return; @@ -990,10 +994,9 @@ void SV_WalkMove (edict_t *ent) return; } - if (sv_nostep.integer) - return; + SV_CheckVelocity(ent); - if ( (int)ent->v->flags & FL_WATERJUMP ) + if (sv_nostep.integer || (int)ent->v->flags & FL_WATERJUMP ) return; VectorCopy (ent->v->origin, nosteporg); @@ -1052,6 +1055,8 @@ void SV_WalkMove (edict_t *ent) VectorCopy (nosteporg, ent->v->origin); VectorCopy (nostepvel, ent->v->velocity); } + + SV_CheckVelocity(ent); } //============================================================================