Fix all 6 Cut 3a Soul Pass #1 findings and add regression tests

This commit is contained in:
Meta Vens 2026-12-04 19:51:16 +01:00
commit b5f1bf7753
14 changed files with 677 additions and 74 deletions

View file

@ -382,8 +382,8 @@ namespace RustToDust.Tests
float climbProgress = maxGroundY - startGroundY;
float minRequiredClimb = testDune ? 4.0f : 2.0f;
float minAllowedUpDot = chassis.IsWalker ? 0.927f : 0.50f;
// VTOLs naturally hover at ~3m AGL and briefly exceed 5m AGL when crossing sharp dune crests at speed
float maxAllowedAirGap = chassis.IsVtol ? 10.5f : 5.0f;
// VTOLs spawn at 10m AGL and glide under gravity over mesa cliff drops instead of slamming downward
float maxAllowedAirGap = chassis.IsVtol ? targetBrush.HeightDelta + 15f : 5.0f;
Assert.True(climbProgress >= minRequiredClimb,
$"Insufficient uphill climb progress (seed={seed}, chassis={chassis.Id}, dune={testDune}): climb={climbProgress:F2}m start=({startX:F1},{startZ:F1},h={startGroundY:F2}) end=({player.X:F1},{player.Z:F1},maxH={maxGroundY:F2}) brush=({targetBrush.X:F1},{targetBrush.Z:F1},rx={targetBrush.RadiusX:F1},rz={targetBrush.RadiusZ:F1},rot={targetBrush.RotationRad:F2},dh={targetBrush.HeightDelta:F1})");