refactor(physics): extract remote motion runtime

This commit is contained in:
Erik 2026-07-21 13:17:58 +02:00
parent d68c83d1a5
commit 5882b308c1
12 changed files with 368 additions and 361 deletions

View file

@ -30,7 +30,7 @@ namespace AcDream.Core.Tests.Physics.Motion;
//
// This harness wires a real MotionInterpreter + AnimationSequencer +
// MotionTableDispatchSink + MoveToManager EXACTLY like GameWindow's
// EnsureRemoteMotionBindings (GameWindow.cs:4251) and ticks them in
// EnsureRemoteMotionBindings and ticks them in
// the retail per-object order: CSequence update → PositionManager adjust →
// complete Frame combine → hook processing → Target/Movement/PartArray/
// Position manager tail. Wire events (aggro stance UM, mt-6 arms, attack
@ -81,8 +81,8 @@ internal sealed class RemoteChaseHarness
public const float OwnRadius = 0.3f;
public const float StickyTargetRadius = 0.5f;
// Field-for-field mirror of GameWindow's RemoteMotion construction
// (GameWindow.cs:592-618): Contact+OnWalkable+Active, InWorld=true (the
// Field-for-field mirror of AcDream.App.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
// (null weenie degrades run-rate to 1.0).
@ -98,7 +98,7 @@ internal sealed class RemoteChaseHarness
public readonly AnimationSequencer Seq;
public readonly MotionTableDispatchSink Sink;
/// <summary>R5-V5: GameWindow's RemoteMotion.Movement twin — the ONE
/// <summary>R5-V5: AcDream.App.Physics.RemoteMotion.Movement twin — the ONE
/// per-entity MovementManager facade owning Interp + the MoveToManager
/// (retail CPhysicsObj::movement_manager).</summary>
public readonly MovementManager Movement;
@ -156,7 +156,7 @@ internal sealed class RemoteChaseHarness
WeenieObj = new RemoteWeenie(),
};
// ── EnsureRemoteMotionBindings (GameWindow.cs:4251) verbatim ──
// ── EnsureRemoteMotionBindings verbatim ──
Sink = new MotionTableDispatchSink(Seq);
Interp.DefaultSink = Sink;
// #174: production binds the seam to Manager.HandleEnterWorld
@ -167,7 +167,7 @@ internal sealed class RemoteChaseHarness
Interp.CheckForCompletedMotions = Seq.Manager.CheckForCompletedMotions;
// ── R5-V5: the MovementManager facade owns Interp + the moveto —
// GameWindow's RemoteMotion ctor + EnsureRemoteMotionBindings
// AcDream.App.Physics.RemoteMotion ctor + EnsureRemoteMotionBindings
// factory shape verbatim (sticky binds inside the factory;
// MakeMoveToManager after the host/Pm exist). ──
Movement = new MovementManager(Interp)