fix(world): restore portal and distant use lifecycles

This commit is contained in:
Erik 2026-07-25 09:59:25 +02:00
parent c730632075
commit 1a14812c44
18 changed files with 401 additions and 196 deletions

View file

@ -1901,6 +1901,18 @@ public sealed class LiveEntityRuntime
&& _spatialAnimationsByLocalId.TryGetValue(entity.Id, out var indexed)
&& ReferenceEquals(indexed, animation);
/// <summary>
/// Returns whether <paramref name="animation"/> is still the canonical
/// animation component of this logical entity incarnation. Motion
/// completion belongs to that CPhysicsObj/PartArray lifetime, not to the
/// transient render-bucket projection used by per-frame presentation.
/// </summary>
internal bool IsCurrentAnimationOwner(
LiveEntityRecord record,
ILiveEntityAnimationRuntime animation) =>
IsCurrentRecord(record)
&& ReferenceEquals(record.AnimationRuntime, animation);
/// <summary>
/// Copies the currently spatial animation owners through the concrete
/// dictionary enumerator. This keeps per-frame traversal allocation-free;