]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Set groundentity when sv_gameplayfix_downtracesupportsongroundflag detects a floor
authorbones_was_here <bones_was_here@xa.org.au>
Fri, 5 Nov 2021 10:22:40 +0000 (20:22 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Sat, 6 Nov 2021 03:30:43 +0000 (13:30 +1000)
Fixes movers not carrying player when walking onto them with no z velocity

qcsrc/common/physics/movetypes/walk.qc

index d74837927b44166256c517eedd1649edf44a7bb4..da6d4cfc364fb45f87fee5390b128ce8b51cb80b 100644 (file)
@@ -46,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