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:
parent
0dc3bfdeff
commit
7e6033d0ad
39 changed files with 3685 additions and 1722 deletions
|
|
@ -4,6 +4,7 @@ using System.Reflection;
|
|||
using AcDream.App.Streaming;
|
||||
using AcDream.Core.Physics;
|
||||
using AcDream.Core.World;
|
||||
using AcDream.Runtime.Entities;
|
||||
using DatReaderWriter.DBObjs;
|
||||
using DatReaderWriter.Types;
|
||||
|
||||
|
|
@ -22,17 +23,16 @@ public sealed class LandblockPhysicsPublisherTests
|
|||
public void Constructor_ClonesHeightTableAndRejectsIncompleteInput()
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => new LandblockPhysicsPublisher(
|
||||
new PhysicsEngine(),
|
||||
new RuntimeEntityObjectLifetime().Physics,
|
||||
new float[255]));
|
||||
Assert.Throws<ArgumentException>(() => new LandblockPhysicsPublisher(
|
||||
new PhysicsEngine(),
|
||||
HeightTable));
|
||||
|
||||
float[] mutable = HeightTable.ToArray();
|
||||
var engine = new PhysicsEngine();
|
||||
var cache = new PhysicsDataCache();
|
||||
engine.DataCache = cache;
|
||||
var publisher = new LandblockPhysicsPublisher(engine, mutable);
|
||||
var lifetime = new RuntimeEntityObjectLifetime(
|
||||
new PhysicsDataCache());
|
||||
PhysicsEngine engine = lifetime.Physics.Engine;
|
||||
var publisher = new LandblockPhysicsPublisher(
|
||||
lifetime.Physics,
|
||||
mutable);
|
||||
mutable[0] = 999f;
|
||||
|
||||
LandblockPhysicsPublication receipt = Begin(
|
||||
|
|
@ -794,11 +794,12 @@ public sealed class LandblockPhysicsPublisherTests
|
|||
PhysicsEngine Engine,
|
||||
PhysicsDataCache Cache) Fixture()
|
||||
{
|
||||
var engine = new PhysicsEngine();
|
||||
var cache = new PhysicsDataCache();
|
||||
engine.DataCache = cache;
|
||||
var lifetime = new RuntimeEntityObjectLifetime(
|
||||
new PhysicsDataCache());
|
||||
PhysicsEngine engine = lifetime.Physics.Engine;
|
||||
PhysicsDataCache cache = lifetime.Physics.DataCache;
|
||||
return (
|
||||
new LandblockPhysicsPublisher(engine, HeightTable),
|
||||
new LandblockPhysicsPublisher(lifetime.Physics, HeightTable),
|
||||
engine,
|
||||
cache);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue