]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'bones_was_here/walking_groundentity_fix' into 'master'
authorMario <mario.mario@y7mail.com>
Sat, 8 Jan 2022 14:32:40 +0000 (14:32 +0000)
committerMario <mario.mario@y7mail.com>
Sat, 8 Jan 2022 14:32:40 +0000 (14:32 +0000)
Set groundentity when sv_gameplayfix_downtracesupportsongroundflag detects a floor

See merge request xonotic/xonotic-data.pk3dir!942

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