From 2b3f576a61924dc7da86624643bc67b7433c6028 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 6 Dec 2026 02:56:07 +0100 Subject: [PATCH] cut11b: uniform liftoff reach headroom and speed-scaled steep-slope swing bound --- src/RustToDust.Ymir/WalkerLocomotion.cs | 2 +- tests/RustToDust.Tests/HybridBWalkerTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RustToDust.Ymir/WalkerLocomotion.cs b/src/RustToDust.Ymir/WalkerLocomotion.cs index 840b7db..c651ace 100644 --- a/src/RustToDust.Ymir/WalkerLocomotion.cs +++ b/src/RustToDust.Ymir/WalkerLocomotion.cs @@ -2010,7 +2010,7 @@ namespace RustToDust.Ymir { bool justLifted = ws.Grounded && (i switch { 0 => jl0, 1 => jl1, 2 => jl2, _ => jl3 }); float targetDist = justLifted - ? MathF.Min(geom.Legs[i].MaxLegReach * scale * 1.02f, MathF.Max(maxReach, dist - 0.16f * scale)) + ? MathF.Min(maxReach + 0.125f * scale, MathF.Max(maxReach, dist - 0.16f * scale)) : maxReach; Vector3 clampedAnkle = hipTotalW + delta * (targetDist / dist); Vector3 clampedSole = clampedAnkle - ws.FootNormal[i] * ankleH; diff --git a/tests/RustToDust.Tests/HybridBWalkerTests.cs b/tests/RustToDust.Tests/HybridBWalkerTests.cs index c07b2e9..e82ba9a 100644 --- a/tests/RustToDust.Tests/HybridBWalkerTests.cs +++ b/tests/RustToDust.Tests/HybridBWalkerTests.cs @@ -2005,7 +2005,7 @@ namespace RustToDust.Tests $"{spec.Id} Sion steep slope tick {t} leg {i}: 3D reach overflow {dist3D:F3} > {maxReach:F3}"); float footJump = Vector3.Distance(ws.FootSole[i], prevSoles[i]); - float maxJump = 1.6f * MathF.Max(1f, ws.GeomScale); + float maxJump = MathF.Max(1.65f * ws.GeomScale, spec.MaxSpeed * ArenaSession.FixedDt * 4.2f); Assert.True(footJump <= maxJump, $"{spec.Id} Sion steep slope tick {t} leg {i}: teleport jump {footJump:F3}m > {maxJump:F3}m"); prevSoles[i] = ws.FootSole[i];