fix(R4-V5): remote transition links stripped by the detached-object guard - door swings snapped (adds register TS-40)
Root cause (pinned by the worktree investigation + verified against source): CMotionInterp's dispatch tails strip link animations for DETACHED objects only (retail `if (physics_obj->cell == 0) RemoveLinkAnimations`, raw @305627, three ported sites: DoInterpretedMotion / StopInterpretedMotion / StopCompletely). The R3 port proxied retail's cell pointer with CellPosition.ObjCellId == 0 - but that #145 field is seeded ONLY by SnapToCell, whose single production caller is the LOCAL PLAYER's SetPosition. Every REMOTE body therefore read "detached" forever, and every dispatch stripped the transition link the motion table had just appended: a used door's swing link died the same tick (pose snapped closed<->open - the live symptom), and remote walk<->run link poses have been silently eaten since the guard landed (masked: locomotion cycles resemble each other; a door's two poses don't). The dispatcher itself (GetObjectSequence link path) was verified retail-verbatim end-to-end - not the bug. Fix: PhysicsBody.InWorld - an explicit "placed in the world" flag carrying exactly the guard's retail meaning (register row TS-40, replacing the previously UNREGISTERED ObjCellId proxy). Set by SnapToCell (retail: enter_world/set_cell assigns the cell) and by RemoteMotion construction (a RemoteMotion exists only for a world entity). All three guard sites now test !InWorld. Default false = retail's pre-enter_world detached state, preserving the guard for genuinely unplaced bodies (bare-harness interps unchanged). Tests: InWorldLinkGuardTests pins the polarity at all guard classes (in-world dispatch keeps links; detached strips; StopCompletely same). Full suite green: 3,961. If the door still snaps after this, the open question is DATA (does the door's table author an On<->Off link at all) - next step per the investigation: dump the real table's Links/StyleDefaults via a DoorSetupGfxObjInspectionTests extension. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
006cf6597a
commit
350fb5e3a5
5 changed files with 126 additions and 3 deletions
|
|
@ -603,6 +603,12 @@ public sealed class GameWindow : IDisposable
|
|||
TransientState = AcDream.Core.Physics.TransientStateFlags.Contact
|
||||
| AcDream.Core.Physics.TransientStateFlags.OnWalkable
|
||||
| AcDream.Core.Physics.TransientStateFlags.Active,
|
||||
// R4-V5 door-swing fix: a RemoteMotion exists only for a
|
||||
// WORLD entity — retail's physics_obj->cell is non-null the
|
||||
// moment the object is placed. Without this, the interp's
|
||||
// detached-object guard stripped every dispatched
|
||||
// transition link (see PhysicsBody.InWorld).
|
||||
InWorld = true,
|
||||
};
|
||||
Motion = new AcDream.Core.Physics.MotionInterpreter(Body);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue