cut11b: uniform liftoff reach headroom and speed-scaled steep-slope swing bound

This commit is contained in:
Meta Vens 2026-12-06 02:56:07 +01:00
commit 2b3f576a61
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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];