fix(streaming): preserve portal destination ownership

Detach old-world spatial ownership atomically, prioritize destination retirement dependencies, and reveal the viewport at the retail transition edge. Give private paperdoll views independent mesh ownership and retain dormant ACE entities so portal revisits preserve server objects without extending active GPU lifetimes.
This commit is contained in:
Erik 2026-07-25 08:35:12 +02:00
parent 2c848d4167
commit 823936ec31
57 changed files with 2551 additions and 324 deletions

View file

@ -89,6 +89,7 @@ internal sealed class LiveEntityLivenessController
private readonly LiveEntityRuntime _runtime;
private readonly ILocalPlayerIdentitySource _identity;
private readonly ILiveEntityPruneSink _prune;
private readonly DormantLiveEntityStore? _dormant;
private readonly LiveEntityLivenessTracker _tracker = new();
private readonly List<LiveEntityLivenessSample> _samples = new();
private double _nextMaintenanceAt;
@ -96,11 +97,13 @@ internal sealed class LiveEntityLivenessController
public LiveEntityLivenessController(
LiveEntityRuntime runtime,
ILocalPlayerIdentitySource identity,
ILiveEntityPruneSink prune)
ILiveEntityPruneSink prune,
DormantLiveEntityStore? dormant = null)
{
_runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
_identity = identity ?? throw new ArgumentNullException(nameof(identity));
_prune = prune ?? throw new ArgumentNullException(nameof(prune));
_dormant = dormant;
}
public void Tick(double now)
@ -153,6 +156,7 @@ internal sealed class LiveEntityLivenessController
public void Clear()
{
_tracker.Clear();
_dormant?.Clear();
_samples.Clear();
_nextMaintenanceAt = 0;
}