refactor(world): separate live lifetime from spatial buckets
Introduce LiveEntityRuntime as the canonical owner of each accepted server-object incarnation, stable local identity, timestamped state, parent relations, runtime components, and exactly-once teardown. Split logical registration from rebucketing so pending landblocks, equipment attachment, pickup re-entry, and GUID replacement reuse the same entity and effect owners. Keep canonical materialized and visible target/radar views distinct, preserve retail leave_world versus exit_world semantics, gate root simulation while cell-less, and track transitional pre-Create F754 owners through delete and session reset. Remove stale-spawn rehydration and make GpuWorldState spatial-only for live objects. Add lifecycle, generation, pending, unload, attachment, event-publication, local-ID, rollback, and effect-cleanup coverage; update architecture, milestones, memory, and the divergence register. Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
parent
8a5d77f7f4
commit
8dd996053d
24 changed files with 2449 additions and 631 deletions
|
|
@ -34,8 +34,8 @@ public sealed class PendingSpawnIntegrationTests
|
|||
// the landblock streams in. ServerGuid != 0 makes this per-instance-tier.
|
||||
var liveEntity = MakeServerSpawned(
|
||||
id: 1, serverGuid: 0xCAFE0001u, gfxObjId: 0x01000099u);
|
||||
// AppendLiveEntity takes the raw cell-form id; it canonicalises internally.
|
||||
state.AppendLiveEntity(0x12340011u, liveEntity);
|
||||
// Projection placement takes the raw cell-form id; it canonicalises internally.
|
||||
state.PlaceLiveEntityProjection(0x12340011u, liveEntity);
|
||||
|
||||
Assert.Equal(1, state.PendingLiveEntityCount);
|
||||
Assert.Empty(captured.IncrementCalls); // not registered yet — landblock not loaded
|
||||
|
|
@ -86,9 +86,9 @@ public sealed class PendingSpawnIntegrationTests
|
|||
|
||||
// Now a live entity arrives — landblock is already loaded.
|
||||
var liveEntity = MakeServerSpawned(id: 2, serverGuid: 0xCAFE0001u, gfxObjId: 0x01000099u);
|
||||
state.AppendLiveEntity(0x12340022u, liveEntity);
|
||||
state.PlaceLiveEntityProjection(0x12340022u, liveEntity);
|
||||
|
||||
// Adapter not invoked again — AppendLiveEntity doesn't drive ref counts.
|
||||
// Adapter not invoked again — projection placement doesn't drive ref counts.
|
||||
Assert.Single(captured.IncrementCalls);
|
||||
Assert.Equal(0, state.PendingLiveEntityCount);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue