]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics/movetypes/walk.qc
Merge branch 'drjaska/ca-less-stalemates' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / movetypes / walk.qc
index 13224f8a3443d022658aa9307dca2f522979d16f..babb38ca4f7c02d966f460703af352826ce6c56d 100644 (file)
@@ -1,4 +1,5 @@
 #include "walk.qh"
+
 void _Movetype_Physics_Walk(entity this, float dt)  // SV_WalkMove
 {
        // if frametime is 0 (due to client sending the same timestamp twice), don't move
@@ -45,7 +46,11 @@ void _Movetype_Physics_Walk(entity this, float dt)  // SV_WalkMove
                else type = MOVE_NORMAL;
                tracebox(upmove, this.mins, this.maxs, downmove, type, this);
                if (trace_fraction < 1 && trace_plane_normal.z > 0.7)
+               {
                        clip |= 1;  // but we HAVE found a floor
+                       // set groundentity so we get carried when walking onto a mover
+                       this.groundentity = trace_ent;
+               }
        }
 
        // if the move did not hit the ground at any point, we're not on ground
@@ -143,7 +148,8 @@ void _Movetype_Physics_Walk(entity this, float dt)  // SV_WalkMove
                        _Movetype_WallFriction(this, move_stepnormal);
        }
        // don't do the down move if stepdown is disabled, moving upward, not in water, or the move started offground or ended onground
-       else if (!GAMEPLAYFIX_STEPDOWN(this) || this.waterlevel >= 3 || start_velocity.z >= (1.0 / 32.0) || !oldonground || IS_ONGROUND(this))
+       else if (!GAMEPLAYFIX_STEPDOWN(this) || this.waterlevel >= 3 || start_velocity.z >= (1.0 / 32.0) 
+                               || !oldonground || IS_ONGROUND(this) || (GAMEPLAYFIX_STEPDOWN_MAXSPEED(this) && vdist(start_velocity, >=, GAMEPLAYFIX_STEPDOWN_MAXSPEED(this)) && !IS_ONSLICK(this)))
        {
                return;
        }