refactor(runtime): own projectile simulation
Move projectile component identity, prediction invalidation, spatial worksets, authoritative corrections, and the retail physics step into AcDream.Runtime. Keep App as the DAT-shape and presentation adapter so ACE outcomes and visible behavior remain unchanged.
This commit is contained in:
parent
fce8e7b18e
commit
2aee33569f
19 changed files with 1255 additions and 335 deletions
|
|
@ -71,14 +71,6 @@ public sealed class RemoteTeleportControllerTests
|
|||
public void LeaveGround() { }
|
||||
}
|
||||
|
||||
private sealed class AlternatingProjectileRuntime(
|
||||
PhysicsBody first,
|
||||
PhysicsBody later) : ILiveEntityProjectileRuntime
|
||||
{
|
||||
private int _reads;
|
||||
public PhysicsBody Body => _reads++ == 0 ? first : later;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PendingDestination_ParksAuthoritativeFrameThenResolvesContactOnLoad()
|
||||
{
|
||||
|
|
@ -867,8 +859,10 @@ public sealed class RemoteTeleportControllerTests
|
|||
Assert.Same(canonicalBody, record.PhysicsBody);
|
||||
Assert.Same(remote, record.RemoteMotionRuntime);
|
||||
|
||||
var projectile = new AlternatingProjectileRuntime(canonicalBody, otherBody);
|
||||
fixture.Live.SetProjectileRuntime(RollbackFixture.Guid, projectile);
|
||||
IRuntimeProjectile projectile = fixture.Live.BindProjectileRuntime(
|
||||
RollbackFixture.Guid,
|
||||
canonicalBody,
|
||||
new ProjectileCollisionSphere(Vector3.Zero, 0.25f));
|
||||
|
||||
Assert.Same(canonicalBody, record.PhysicsBody);
|
||||
Assert.Same(projectile, record.ProjectileRuntime);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue