refactor(runtime): own per-session physics simulation

Move the sole PhysicsEngine, production cache, collision admissions, canonical bodies and hosts, remote components, ordinary/remote worksets, simulation, cell commits, and shadow synchronization under RuntimeEntityObjectLifetime. Keep App as the prepared-asset, animation-input, and render-projection adapter while preserving the named-retail update and collision order.

Add exact-incarnation, object-clock, callback-reentrancy, GUID-reuse, two-runtime isolation, source ownership, collision publication, and graphical projection coverage. Release build and the complete 8,588-test solution pass.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Erik 2026-07-26 13:39:57 +02:00
parent 0dc3bfdeff
commit 7e6033d0ad
39 changed files with 3685 additions and 1722 deletions

View file

@ -5,6 +5,7 @@ using AcDream.App.Physics;
using AcDream.App.Rendering;
using AcDream.Core.Physics;
using AcDream.Core.Physics.Motion;
using AcDream.Runtime.Physics;
using DatReaderWriter.DBObjs;
using DatReaderWriter.Types;

View file

@ -81,7 +81,7 @@ internal sealed class RemoteChaseHarness
public const float OwnRadius = 0.3f;
public const float StickyTargetRadius = 0.5f;
// Field-for-field mirror of AcDream.App.Physics.RemoteMotion construction:
// Field-for-field mirror of AcDream.Runtime.Physics.RemoteMotion construction:
// Contact+OnWalkable+Active, InWorld=true (the
// R4-V5 door fix — without it the interp's detached-object guard strips
// every dispatched transition link), and the R4-V5 #160 RemoteWeenie
@ -98,7 +98,7 @@ internal sealed class RemoteChaseHarness
public readonly AnimationSequencer Seq;
public readonly MotionTableDispatchSink Sink;
/// <summary>R5-V5: AcDream.App.Physics.RemoteMotion.Movement twin — the ONE
/// <summary>R5-V5: AcDream.Runtime.Physics.RemoteMotion.Movement twin — the ONE
/// per-entity MovementManager facade owning Interp + the MoveToManager
/// (retail CPhysicsObj::movement_manager).</summary>
public readonly MovementManager Movement;
@ -167,7 +167,7 @@ internal sealed class RemoteChaseHarness
Interp.CheckForCompletedMotions = Seq.Manager.CheckForCompletedMotions;
// ── R5-V5: the MovementManager facade owns Interp + the moveto —
// AcDream.App.Physics.RemoteMotion ctor + EnsureRemoteMotionBindings
// AcDream.Runtime.Physics.RemoteMotion ctor + EnsureRemoteMotionBindings
// factory shape verbatim (sticky binds inside the factory;
// MakeMoveToManager after the host/Pm exist). ──
Movement = new MovementManager(Interp)