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

@ -19,7 +19,7 @@ public sealed class RemoteTeleportPlacementTests
0x01010001u,
new Vector3(3f, 4f, 5f),
new Vector3(3f, 4f, 5f));
var remote = new AcDream.App.Rendering.GameWindow.RemoteMotion(body);
var remote = new AcDream.App.Physics.RemoteMotion(body);
Quaternion orientation = Quaternion.CreateFromAxisAngle(Vector3.UnitZ, 0.75f);
RemoteTeleportPlacement.Apply(
@ -54,7 +54,7 @@ public sealed class RemoteTeleportPlacementTests
State = PhysicsStateFlags.Gravity | PhysicsStateFlags.ReportCollisions,
};
var contactPlane = new Plane(Vector3.UnitZ, 0f);
var remote = new AcDream.App.Rendering.GameWindow.RemoteMotion(body)
var remote = new AcDream.App.Physics.RemoteMotion(body)
{
Airborne = true,
};
@ -97,7 +97,7 @@ public sealed class RemoteTeleportPlacementTests
// landblock is absent. SetPositionInternal must still receive the
// grounded source edge captured before parking.
body.TransientState &= ~(TransientStateFlags.Contact | TransientStateFlags.OnWalkable);
var remote = new AcDream.App.Rendering.GameWindow.RemoteMotion(body)
var remote = new AcDream.App.Physics.RemoteMotion(body)
{
Airborne = true,
};
@ -141,7 +141,7 @@ public sealed class RemoteTeleportPlacementTests
// calc_acceleration, which clears grounded angular drift, before
// set_on_walkable installs the steep destination's false value.
body.TransientState &= ~(TransientStateFlags.Contact | TransientStateFlags.OnWalkable);
var remote = new AcDream.App.Rendering.GameWindow.RemoteMotion(body);
var remote = new AcDream.App.Physics.RemoteMotion(body);
RemoteTeleportPlacement.Apply(
remote,
@ -171,7 +171,7 @@ public sealed class RemoteTeleportPlacementTests
{
var original = new Vector3(7f, 8f, 9f);
var body = new PhysicsBody { Position = original };
var remote = new AcDream.App.Rendering.GameWindow.RemoteMotion(body);
var remote = new AcDream.App.Physics.RemoteMotion(body);
Assert.Throws<ArgumentOutOfRangeException>(() =>
RemoteTeleportPlacement.Apply(