]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
being glued to the floor while swimming = bad
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 2 Sep 2004 13:16:31 +0000 (13:16 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 2 Sep 2004 13:16:31 +0000 (13:16 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4418 d7cf8633-e32d-0410-b094-e92efae38249

sv_phys.c

index b25bc527af729dfd6a4fc22e9e4285eb81a032d3..1b9a85285314429e4bedd863e7e1db02a53cecd0 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -1025,6 +1025,12 @@ void SV_WalkMove (edict_t *ent)
        originalmove_flags = (int)ent->v->flags;
        originalmove_groundentity = ent->v->groundentity;
 
+       if ((int)ent->v->flags & FL_WATERJUMP)
+               return;
+
+       if (sv_nostep.integer)
+               return;
+       
        // if move didn't block on a step, return
        if (clip & 2)
        {
@@ -1032,12 +1038,6 @@ void SV_WalkMove (edict_t *ent)
                if (fabs(start_velocity[0]) < 0.03125 && fabs(start_velocity[1]) < 0.03125)
                        return;
        
-               if (sv_nostep.integer)
-                       return;
-               
-               if ((int)ent->v->flags & FL_WATERJUMP)
-                       return;
-       
                if (ent->v->movetype != MOVETYPE_FLY)
                {
                        // return if gibbed by a trigger
@@ -1092,7 +1092,7 @@ void SV_WalkMove (edict_t *ent)
                if (clip & 2 && sv_wallfriction.integer)
                        SV_WallFriction (ent, stepnormal);
        }
-       else if (!sv_gameplayfix_stepdown.integer || !oldonground || ((int)ent->v->flags & FL_ONGROUND))
+       else if (!sv_gameplayfix_stepdown.integer || !oldonground || ((int)ent->v->flags & FL_ONGROUND) || ent->v->waterlevel >= 2)
                return;
 
        // move down