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

@ -240,6 +240,11 @@ public sealed class LandblockPresentationPipeline
public void AdvanceRetirements(StreamingWorkMeter meter) =>
_retirements.Advance(meter);
internal void AdvancePriorityRetirement(
uint landblockId,
StreamingWorkMeter meter) =>
_retirements.AdvancePriority(landblockId, meter);
public void BeginFullRetirement(uint landblockId)
{
_retirements.BeginFull(landblockId);
@ -260,6 +265,29 @@ public sealed class LandblockPresentationPipeline
internal void EnqueueNearLayerRetirement(uint landblockId) =>
_retirements.BeginNearLayer(landblockId);
/// <summary>
/// Withdraws the complete old spatial generation in one transaction, then
/// transfers its exact receipts to the ordinary budgeted retirement FIFO.
/// </summary>
internal GpuWorldRecenterRetirement DetachAllForOriginRecenter()
{
GpuWorldRecenterRetirement detached =
_state.DetachAllForOriginRecenter();
Exception? adoptionFailure =
_retirements.AdoptDetachedFull(detached.Landblocks);
Exception? failure = (detached.ObserverFailure, adoptionFailure) switch
{
(null, null) => null,
({ } observer, null) => observer,
(null, { } adoption) => adoption,
({ } observer, { } adoption) => new AggregateException(
"Origin-recenter spatial observers and retirement adoption failed.",
observer,
adoption),
};
return detached with { ObserverFailure = failure };
}
public void PublishLoaded(LandblockStreamResult.Loaded loaded)
{
ArgumentNullException.ThrowIfNull(loaded);