]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added some SV_CheckVelocity calls to MOVETYPE_WALK code
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 19 Sep 2003 19:44:00 +0000 (19:44 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 19 Sep 2003 19:44:00 +0000 (19:44 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3470 d7cf8633-e32d-0410-b094-e92efae38249

sv_phys.c

index 83ba3545cc6b86601ef3388ba08e1837928fdd73..f592b08e40f53010a205140b5f0df78b95aaded5 100644 (file)
--- 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);
 }
 
 //============================================================================