feat(physics): port retail complete object frame pipeline

Restore the named-retail object update order across local, remote, static, projectile, animation, shadow, teleport, and effect lifetimes. Separate authoritative root commits from spatial rebucketing, preserve per-owner hook/FIFO ordering, and remove update-path allocations with exact lifecycle and residency gates.

Add deterministic conformance, adversarial lifetime, GUID-reuse, pending-cell, quaternion, timestamp, and allocation coverage. Release build is warning-free and all 6,446 tests pass with five intentional skips; retail, architecture, and adversarial reviews are clean.

Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-20 09:10:31 +02:00
parent 31a0889f08
commit f961d70023
77 changed files with 12513 additions and 1871 deletions

View file

@ -13,8 +13,7 @@ namespace AcDream.Core.Tests.Physics.Motion;
/// R2-Q5 — <see cref="MotionTableDispatchSink"/>: the funnel's dispatches go
/// straight into <see cref="AnimationSequencer.PerformMovement"/> (no axis
/// collection, no priority pick, no fallback chain — GetObjectSequence
/// 0x00522860 + is_allowed decide) with the TurnApplied/TurnStopped
/// ObservedOmega seam.
/// 0x00522860 + is_allowed decide).
/// </summary>
public class MotionTableDispatchSinkTests
{
@ -100,15 +99,10 @@ public class MotionTableDispatchSinkTests
}
[Fact]
public void ApplyMotion_Turn_Branch4Modifier_FiresTurnApplied_NoCycleChange()
public void ApplyMotion_Turn_Branch4Modifier_PreservesCycleAndAppliesDatOmega()
{
var seq = MakeSequencer();
uint? turnMotion = null;
float turnSpeed = 0f;
var sink = new MotionTableDispatchSink(seq)
{
TurnApplied = (m, s) => { turnMotion = m; turnSpeed = s; },
};
var sink = new MotionTableDispatchSink(seq);
sink.ApplyMotion(Walk, 1.0f);
sink.ApplyMotion(TurnRight, 1.5f);
@ -116,22 +110,19 @@ public class MotionTableDispatchSinkTests
// The AP-73 mechanism for real: substate cycle untouched, the turn
// is a MotionState modifier with its dat omega combined.
Assert.Equal(Walk, seq.CurrentMotion);
Assert.Equal((TurnRight, 1.5f), (turnMotion!.Value, turnSpeed));
Assert.Equal(1.2f * 1.5f, seq.CurrentOmega.Z, 3);
}
[Fact]
public void StopMotion_Turn_FiresTurnStopped_UnwindsModifierPhysics()
public void StopMotion_Turn_UnwindsModifierPhysics()
{
var seq = MakeSequencer();
bool stopped = false;
var sink = new MotionTableDispatchSink(seq) { TurnStopped = () => stopped = true };
var sink = new MotionTableDispatchSink(seq);
sink.ApplyMotion(Walk, 1.0f);
sink.ApplyMotion(TurnRight, 1.5f);
sink.StopMotion(TurnRight);
Assert.True(stopped);
// StopSequenceMotion Case B (0x00522fc0): subtract_motion of the dat
// omega + modifier unlinked.
Assert.Equal(0f, seq.CurrentOmega.Z, 3);