From 1375477193afe06d03e0605ffc796db6cb509800 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 19 Sep 2003 19:44:00 +0000 Subject: [PATCH] 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 --- sv_phys.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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); } //============================================================================ -- 2.39.2