]> 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 e0d05d7c557c9ab112bb2e5c0d704a619d5a082c..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