5.0 KiB
Body callback ownership implementation
2026-11-05. Continues Jimmy movement after the air/render checkpoint27be8ed. Current lab/outside capsule and all special-contact admission gates are preserved. This implements the body publication/mode prerequisites, not new climb/hazard mechanics or a complete original body in every level.
Evidence and implementation
Root publication records19 new original component cases using actual copied479D20/47B4B0/kernel. Body modes records87 new observations using full479D20/support/friction and a synthetic dispatcher. Both reuse retained REA Evidence and guard original spans/offsets/provenance.
OriginalBodyState now retains finite live-root W, source previous Vec4, support
anchor and independent BodyModes: integration210, support1C8, collision220,
world response1D0 and alternate228. Nullable modes mean the ordinary constructor
defaults; the explicit point constructor supplies W1. Scooter reset now uses that
point constructor instead of zero-initializing W through default(struct).
OrdinaryBodyStep.PreviousPosition deliberately stays the frame-entry XYZ
diagnostic consumed by the existing provisional dynamic adapter. It is not used
as a substitute for the newly retained previous Vec4.
- Support clear precedes the integration gate. Inactive integration preserves roots, anchor, pending work and the existing collision context, then returns.
- The geometry argument/global getter remains independent of body modes. Global geometry-off follows the recovered gravity/support policy. A scene getter optionally models support's fresh global read after callbacks.
- World response-off copies current root to previous and translates, retaining gravity/impulse, optional support/friction and the previous static context.
- Collision-off translates or holds according to228, preserves previous root, skips support/friction and still reaches suppression. Neither unclipped branch acquires the world branch's−25000 candidate clamp.
- World callbacks now receive the live entry root, not the tentative clipped candidate. They may edit live/previous independently. Fresh XYZW equality controls publication of the precomputed candidate and its original W. Callback roots rejected by that barrier receive neither old fallingY nor candidate clamp. Changing both roots to equal still permits the old candidate to overwrite them.
- Support uses fresh live/previous XYZ after publication/rejection. Landing37C observes the floor root, anchor and zeroed vertical acceleration but old velocity. Callback root/anchor/acceleration/impulse/modes survive; source cached VX/Z plus Y0 and supported=true are published afterward. Friction/suppression read current speed/motion and retain their own ownership.
- The existing wall hook remains wall-only. Ordinary/profile ceiling/reflection behavior is kept separate. Static context resets only in the world branch; other branches retain it, reporting zero new traversal work.
tests/GamePort.BodyOwnershipTests compares81 complete native mode/landing outputs
and19 root outputs. The17 native root-isolation cases no-op support; the managed
support gate mirrors those publication outputs, while two cases execute actual
support in both implementations. For six native synthetic-dispatch mutation cases,
a real wall delivers the managed callback: owned state/flags/branch continuation
compare, while intentionally different clipped XYZ is not claimed as numeric
conformance. All100 complete comparisons and six state comparisons pass.
Existing20 body,13 Scooter and13 Grappler groups pass in initial targeted runs. Artifacts: artifacts/body-contact-integration/{ownership-initial,body-initial, scooter-initial,grappler-initial,build-initial}.log. The full regression, native and package results are recorded below as verification finishes.
Remaining integration boundary
No real Jimmy material120..129/110..119/FENCE/LADDER callback is enabled here. Animation acceptance/end/fallback, hazard/impulse updater4255C0, successful ray filters, control/facing/action state, dynamic eligibility and scene-wide shared collision globals still need separate recovery and runtime proof. No callback is classified ordinary merely to bypass constructor rejection.
LabSimulation still reconstructs the admitted ordinary body each pass; actual multi-frame special modes must persist actor state when their callbacks are integrated. Vehicles/projectiles already retain their body records. The per-body static context remains a bounded approximation of original scene-global ownership. Radius/factor/friction/suppression arguments remain fixed during the admitted pass; reentrant/nested body updates and other mutable getter side effects are not established by these finite probes. Modern F3 noclip is a separate policy.
The root record adds no TSK/save fields or runtime original-code dependency. Physics remains independent of raw player control. The existing rendering/air state and upright local alignment from the previous checkpoint are preserved.