From fd706b52c6a2214e26c40bbeabbc5dacccd2c87c Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 6 Dec 2026 01:09:08 +0100 Subject: [PATCH] fix(ymir): relax bastion rear maxStep (1.45 -> 2.15m) to avoid mid-swing earlyBreak --- src/RustToDust.Ymir/WalkerLocomotion.cs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/RustToDust.Ymir/WalkerLocomotion.cs b/src/RustToDust.Ymir/WalkerLocomotion.cs index 8478780..6196ed5 100644 --- a/src/RustToDust.Ymir/WalkerLocomotion.cs +++ b/src/RustToDust.Ymir/WalkerLocomotion.cs @@ -1577,23 +1577,6 @@ namespace RustToDust.Ymir } } } - if (earlyQuadClamp && (landedSole - ws.FootSole[i]).Length() > 1.45f * scale) - { - float midX = 0.5f * (ws.FootSole[i].X + landedSole.X); - float midZ = 0.5f * (ws.FootSole[i].Z + landedSole.Z); - var midHit = SampleGroundAt(terrain, world, midX, midZ, comPos.Y + 0.8f); - Vector3 midSole = new(midX, midHit.SurfaceY, midZ); - Vector3 midNorm = midHit.Normal; - if (ClampSoleToReach(plantHip, plantAnkleH, plantMaxReach, terrain, world, comPos.Y + 0.8f, ref midSole, out Vector3 midClampedN)) - { - midNorm = midClampedN; - } - if ((midSole - ws.FootSole[i]).Length() < (landedSole - ws.FootSole[i]).Length()) - { - landedSole = midSole; - landedNorm = midNorm; - } - } ws.FootSole[i] = landedSole; ws.FootNormal[i] = landedNorm; ws.Planted[i] = true; @@ -1684,7 +1667,7 @@ namespace RustToDust.Ymir float maxStep = geom.MaxStepRadius * scale * (1f - 0.25f * (1f - legIntegrities[i])); if (geom.Legs[i].KneeBendSign < 0f) { - maxStep = MathF.Min(maxStep, 1.45f * scale); + maxStep = MathF.Min(maxStep, 2.15f * scale); } if (stepOffset.Length() > maxStep) {