fix(streaming): preserve exact live projection identity
Carry RuntimeEntityKey through spatial residency, visibility transitions, rebucketing, quiescence, landblock retirement, and origin recentering. This prevents stale incarnation edges from mutating a replacement projection while retaining the static DAT-entity path. Validated by 104 focused ownership/streaming tests, the Release solution build, and 8,444 complete Release tests with five existing skips. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
420e5eea70
commit
e937cc36df
8 changed files with 338 additions and 120 deletions
|
|
@ -2168,9 +2168,9 @@ public sealed class LiveEntityRuntimeTests
|
|||
0x01010001u,
|
||||
id => Entity(id, guid))!;
|
||||
bool replaced = false;
|
||||
spatial.LiveProjectionVisibilityChanged += (localEntityId, visible) =>
|
||||
spatial.LiveProjectionVisibilityChanged += (key, visible) =>
|
||||
{
|
||||
if (replaced || visible || localEntityId != original.Id)
|
||||
if (replaced || visible || key.LocalEntityId != original.Id)
|
||||
return;
|
||||
replaced = true;
|
||||
Assert.True(runtime.UnregisterLiveEntity(
|
||||
|
|
@ -2325,9 +2325,9 @@ public sealed class LiveEntityRuntimeTests
|
|||
0x01010001u,
|
||||
id => Entity(id, guid))!;
|
||||
bool rebucketed = false;
|
||||
spatial.LiveProjectionVisibilityChanged += (localEntityId, visible) =>
|
||||
spatial.LiveProjectionVisibilityChanged += (key, visible) =>
|
||||
{
|
||||
if (rebucketed || visible || localEntityId != original.Id)
|
||||
if (rebucketed || visible || key.LocalEntityId != original.Id)
|
||||
return;
|
||||
rebucketed = true;
|
||||
Assert.True(runtime.RebucketLiveEntity(guid, 0x03030033u));
|
||||
|
|
@ -2383,7 +2383,7 @@ public sealed class LiveEntityRuntimeTests
|
|||
Assert.Equal((ushort)2, replacement.Generation);
|
||||
Assert.True(replacement.IsSpatiallyVisible);
|
||||
Assert.True(spatial.IsLiveEntityVisible(
|
||||
replacement.WorldEntity!.Id));
|
||||
replacement.ProjectionKey!.Value));
|
||||
Assert.Equal(2, resources.RegisterCount);
|
||||
Assert.Equal(1, resources.UnregisterCount);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue