refactor(physics): delete legacy PhysicsEngine.Resolve/ResolvePlacement/HasCellSurface (C5a, AP-1/AD-1)
Member-wise deletion of the three legacy resolver members named in docs/research/2026-08-05-c5a-contract.md: PhysicsEngine.Resolve, PhysicsEngine.HasCellSurface, and PhysicsEngine.ResolvePlacement. An exhaustive receiver census over src/ found zero production callers of any of the three — every production placement writer already reaches the canonical PhysicsEngine.SetPosition transaction exclusively through RuntimeSetPositionState (three call sites total). The deletion is purely member-wise: IsSpawnCellReady and AdjustPosition, which shared the same source region as the deleted members, are preserved byte-identical — every remaining production caller of either (including PhysicsCameraCollisionProbe, AdjustPosition's sole surviving production caller) is unaffected. Companion changes: - PlayerMovementController's 3-argument SetPosition test overload is renamed to SeedPlacementForTest (internal) and CommitPreparedPosition is deleted; 83 call sites across 19 test files were mechanically renamed to match. - Seven pinned test dispositions from the contract are executed: 3.1 (PhysicsEngineTests.cs: 11 legacy-resolver tests deleted, 6 ResolveWithTransition tests kept), 3.2/3.3/3.4 (re-point to canonical SetPosition, with TransitionScratchDifferentialTests.cs additionally gaining positive IsCommitted assertions after each bitwise comparison so the differential proves a placement actually committed, not just that two possibly-uncommitted results match), 3.5 (Runtime rename), and 3.6 (PlayerMovementPlacementTransactionTests.cs rewritten — its xmldoc now states plainly that the render-root publish moved to RuntimeSetPositionState.cs, but the sticky-release relocation claim was false and is retracted; this disposition's coverage loss is the sticky release path, not silently absorbed elsewhere). - Stale `PhysicsEngine.Resolve`/`Resolve` doc citations in CellTransit.cs, PlayerMovementController.cs, and HeadlessSessionWorldProjection.cs are corrected to name the surviving canonical entry points by symbol (SetPosition, AdjustSetPosition/AdjustPosition, ResolveWithTransition) rather than fragile line numbers. Retires AP-1 and AD-1 in docs/architecture/retail-divergence-register.md: both rows described production zero-delta placement routing remaining on the legacy resolver pending the Slice 4B2/4B route cutover; that resolver no longer exists, so the condition each row tracked is now structurally false rather than merely narrowed. AP-145 (routed through the prior commit) and this commit's AP-1/AD-1 together bring the section counts to 101 AP / 47 AD active rows. Builds on the AP-145 fix (previous commit) — this commit's staged tree was independently rebuilt and its four suites independently rerun on top of that commit before this commit was created, in addition to the combined rebuild/rerun below. Full-solution build: 0 errors (21 pre-existing warnings, all unrelated). Suite results (combined tree): Core 4270/4271 passed (1 skip; the single DatSoundCacheTests concurrent-decode-dedup failure is a known load-sensitive race, confirmed passing standalone and unrelated to this change), Runtime 1176/1176, Headless 86/86, App 4132/4135 (3 skips). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
f8e55ba5e4
commit
6921a02744
34 changed files with 508 additions and 946 deletions
|
|
@ -142,8 +142,11 @@ internal enum PlayerMovementControllerPublicationLifecycle
|
|||
/// velocity clamping — all from the decompiled retail client.
|
||||
/// - MotionInterpreter owns the motion state machine: walk/run/jump
|
||||
/// validation, state tracking, speed constants from the retail dat.
|
||||
/// - PhysicsEngine.Resolve is still used each frame to snap the player
|
||||
/// to terrain/cell floor Z and detect ground contact.
|
||||
/// - PhysicsEngine.ResolveWithTransition is still used each frame to snap
|
||||
/// the player to terrain/cell floor Z and detect ground contact (C5a,
|
||||
/// 2026-08-05: the legacy PhysicsEngine.Resolve this note used to name
|
||||
/// is deleted, zero production callers; ResolveWithTransition's
|
||||
/// sphere-sweep resolver is, and always was, the real per-frame path).
|
||||
/// </summary>
|
||||
public sealed class PlayerMovementController
|
||||
{
|
||||
|
|
@ -1743,21 +1746,19 @@ public sealed class PlayerMovementController
|
|||
_physics.UpdatePlayerCurrCell(newCellId);
|
||||
}
|
||||
|
||||
public void SetPosition(Vector3 pos, uint cellId)
|
||||
// #145: tests + legacy callers run in the world==block-local frame (no
|
||||
// streaming center), so the cell-local seed IS the world position. This
|
||||
// makes the carried anchor (body.Position − CellPosition.Origin) == (0,0,0),
|
||||
// identical to the legacy Zero terrain-origin fallback → behaviour unchanged.
|
||||
=> SetPosition(pos, cellId, pos);
|
||||
|
||||
/// <summary>
|
||||
/// Server-snap / teleport placement. <paramref name="cellLocal"/> is the
|
||||
/// LANDBLOCK-relative position (the wire's local, or world − landblock origin)
|
||||
/// which seeds the body's cell-relative <c>CellPosition</c> WITHOUT any streaming
|
||||
/// center (#145). A teleport is a large jump, so this snaps the cell frame
|
||||
/// directly via <c>SnapToCell</c> rather than delta-syncing through the setter.
|
||||
/// C5a (2026-08-05): this seed exists ONLY to place a controller directly
|
||||
/// in test fixtures. Production placement never calls it — the retail
|
||||
/// server-snap / teleport / enter-world path commits through
|
||||
/// <see cref="PreparePositionForCommit"/> followed by
|
||||
/// <see cref="ArmConstraintLeashAtCommittedPlacement"/> (or, for the
|
||||
/// already-live case, canonical <c>SetPositionCore</c> callers inside
|
||||
/// this class). <paramref name="cellLocal"/> is the LANDBLOCK-relative
|
||||
/// position (the wire's local, or world − landblock origin) which seeds
|
||||
/// the body's cell-relative <c>CellPosition</c> WITHOUT any streaming
|
||||
/// center (#145).
|
||||
/// </summary>
|
||||
public void SetPosition(Vector3 pos, uint cellId, Vector3 cellLocal)
|
||||
internal void SeedPlacementForTest(Vector3 pos, uint cellId, Vector3 cellLocal)
|
||||
{
|
||||
EnsurePublishedForRuntimeOperation();
|
||||
SetPositionCore(
|
||||
|
|
@ -1786,22 +1787,14 @@ public sealed class PlayerMovementController
|
|||
publishSharedState: false);
|
||||
}
|
||||
|
||||
internal void CommitPreparedPosition()
|
||||
{
|
||||
EnsurePublishedForRuntimeOperation();
|
||||
_physics.UpdatePlayerCurrCell(CellId);
|
||||
PositionManager?.UnStick();
|
||||
// #167 (Campaign P P5): mirrors the SetPositionCore teleport_hook
|
||||
// teardown+rearm below — see that comment for the retail citation.
|
||||
RearmConstraintLeashAtCurrentPosition();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// C3c-R1: arms the login-entry constraint leash from the Runtime
|
||||
/// publication chain. The flip deleted the only login-path caller of
|
||||
/// <see cref="RearmConstraintLeashAtCurrentPosition"/> (the App-side
|
||||
/// <see cref="CommitPreparedPosition"/> call in the old
|
||||
/// player-mode-entry commit); the dormant activation's final commit
|
||||
/// <c>CommitPreparedPosition</c> call in the old
|
||||
/// player-mode-entry commit, removed C5a — production placement now
|
||||
/// arms exclusively here and at <see cref="SetPositionCore"/>'s
|
||||
/// teleport_hook teardown+rearm); the dormant activation's final commit
|
||||
/// (<c>RuntimeSetPositionState.TryApplyDormantLocalActivationFinalCommit</c>)
|
||||
/// is the accepted-position event that replaces it — retail arms at
|
||||
/// every accepted-position event (<c>SmartBox::HandleReceivedPosition</c>
|
||||
|
|
@ -1824,9 +1817,11 @@ public sealed class PlayerMovementController
|
|||
/// immediately after <c>TeleportPlayer</c>'s teardown, anchored to the
|
||||
/// RECEIVED position (here, the body's just-snapped current position).
|
||||
/// Shared by the teleport path (after UnConstrain), the deferred
|
||||
/// player-mode-entry commit path (<see cref="CommitPreparedPosition"/>),
|
||||
/// which never ran UnConstrain because nothing could have armed the
|
||||
/// leash before the controller had a <see cref="PositionManager"/>,
|
||||
/// player-mode-entry commit path (formerly the App-side
|
||||
/// <c>CommitPreparedPosition</c> caller, removed C5a; now
|
||||
/// <see cref="ArmConstraintLeashAtCommittedPlacement"/>'s Runtime-owned
|
||||
/// caller), which never ran UnConstrain because nothing could have armed
|
||||
/// the leash before the controller had a <see cref="PositionManager"/>,
|
||||
/// and the C3c first-entry placement commit
|
||||
/// (<see cref="ArmConstraintLeashAtCommittedPlacement"/>).
|
||||
/// docs/research/2026-07-30-constraint-leash-constants.md §2/§3.2.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue