test(physics): Phase W triage — fix stale Path6/tick-gate/ComputeOffset tests (behavior changed by L.3.2/L.4/L.5)
Four tests were asserting pre-change behavior after intentional production changes: #2 BSPStepUpTests.C3_Path6_AirborneMoverHitsSteepSlope_SetsCollideb1af56e(L.4, 2026-04-30) added a steep-normal gate in Path 6 that fires BEFORE SetCollide. Airborne sphere hitting steep poly now returns Slid + Collide=false (slide-tangent interim fix). Updated assertion + renamed to ReturnsSlid. #7 PlayerMovementControllerTests.Update_ForwardInput_MovesInFacingDirection #8 DispatcherToMovementIntegrationTests.Dispatcher_W_held_produces_forward_motion235de33(L.5, 2026-04-30) added _physicsAccum accumulator gate: a single Update(1.0f) only integrates one MaxQuantum (0.1s ~ 0.312m at walk speed), not the full 1s. Time is carried in accumulator (not dropped). Fixed both tests to loop Update(MaxQuantum) for ~11 ticks to accumulate >2m of real forward motion, preserving the original distance-threshold assertion intent. #9 PositionManagerTests.ComputeOffset_BothActive_Combined842dfcd(L.3.2, 2026-05-03) changed ComputeOffset from additive (rootMotion + correction) to replace semantics: when AdjustOffset returns non-zero, it REPLACES root motion (retail Frame::operator= semantics). offset.Y = 0 (not 0.4); root motion is dropped when catch-up engages. Updated assertion and renamed to CorrectionReplacesRootMotion. Suite: 9 failures → 5 (only the 5 known-bug tests remain red). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
21609a7cd7
commit
4bc99fc6fd
4 changed files with 48 additions and 19 deletions
|
|
@ -396,14 +396,18 @@ public class BSPStepUpTests
|
|||
|
||||
/// <summary>
|
||||
/// Airborne mover descending toward a steep slope (normal.Z < FloorZ):
|
||||
/// Path 6 should still set the Collide flag (it fires for any polygon hit,
|
||||
/// walkable or not).
|
||||
/// Path 6 returns <see cref="TransitionState.Slid"/> and does NOT set
|
||||
/// the Collide flag — the steep-normal slide-tangent branch (L.4,
|
||||
/// commit b1af56e, 2026-04-30) intercepts the hit before SetCollide is
|
||||
/// called and projects the move along the steep face instead, keeping the
|
||||
/// body airborne with the falling animation.
|
||||
///
|
||||
/// <para>Retail: set_collide fires unconditionally when sphere_intersects_poly
|
||||
/// hits; the walkable check happens later in the Collide-flag handler.</para>
|
||||
/// <para>This is a documented intentional deviation from retail (retail calls
|
||||
/// set_collide unconditionally; our interim port uses slide-tangent while
|
||||
/// the retail step_up_slide / cliff_slide chain port is completed).</para>
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void C3_Path6_AirborneMoverHitsSteepSlope_SetsCollide()
|
||||
public void C3_Path6_AirborneMoverHitsSteepSlope_ReturnsSlid()
|
||||
{
|
||||
var (root, resolved) = BSPStepUpFixtures.SlopedUnwalkable();
|
||||
|
||||
|
|
@ -423,11 +427,13 @@ public class BSPStepUpTests
|
|||
root, resolved, t, localSphere, null,
|
||||
currPos, Vector3.UnitZ, 1.0f);
|
||||
|
||||
// After L.2.2: Collide flag set, Adjusted returned.
|
||||
// Currently: Slid (wall-slide).
|
||||
Assert.Equal(TransitionState.Adjusted, result);
|
||||
Assert.True(t.SpherePath.Collide,
|
||||
"Expected Collide flag set when airborne sphere hits slope (L.2.2)");
|
||||
// L.4 slide-tangent (b1af56e, 2026-04-30): steep polygon hit by
|
||||
// airborne sphere returns Slid (not Adjusted) and does NOT set
|
||||
// the Collide flag — the into-wall displacement is removed and
|
||||
// CollisionNormal/SlidingNormal are set instead.
|
||||
Assert.Equal(TransitionState.Slid, result);
|
||||
Assert.False(t.SpherePath.Collide,
|
||||
"Collide must NOT be set when the L.4 steep-slope slide-tangent fires");
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue