Wire client VTOL/arc HUD & inputs and add Cut 3a tests

This commit is contained in:
Meta Vens 2026-12-04 19:11:33 +01:00
commit eb579a6ede
10 changed files with 552 additions and 86 deletions

View file

@ -382,13 +382,15 @@ 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;
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})");
Assert.True(minBottomRel >= -0.35f,
$"Terrain tunneling detected (seed={seed}, chassis={chassis.Id}, dune={testDune}): minBottomRel={minBottomRel:F2}m");
Assert.True(maxAirGap <= 5.0f,
$"Excessive sky launch detected (seed={seed}, chassis={chassis.Id}, dune={testDune}): maxAirGap={maxAirGap:F2}m");
Assert.True(maxAirGap <= maxAllowedAirGap,
$"Excessive sky launch detected (seed={seed}, chassis={chassis.Id}, dune={testDune}): maxAirGap={maxAirGap:F2}m (max={maxAllowedAirGap:F1}m)");
Assert.True(minUpDot >= minAllowedUpDot,
$"Excessive chassis tilt (seed={seed}, chassis={chassis.Id}, dune={testDune}): minUpDot={minUpDot:F3} (req>={minAllowedUpDot:F3})");
}