feat(app): project canonical runtime placements
This commit is contained in:
parent
ef43667872
commit
74c9b155bd
5 changed files with 1395 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Globalization;
|
||||
using AcDream.Runtime.Physics;
|
||||
|
||||
namespace AcDream.Runtime.World;
|
||||
|
||||
|
|
@ -247,6 +248,32 @@ public sealed class RuntimeWorldTransitState
|
|||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the portal suffix carried by a canonical SetPosition
|
||||
/// projection receipt against this instance's live transit ownership.
|
||||
/// Shape equality alone is insufficient: a superseded, cancelled, or
|
||||
/// completed host token can remain structurally valid after it has lost
|
||||
/// authority to reveal the destination.
|
||||
/// </summary>
|
||||
public bool IsCurrentPlacementAuthority(
|
||||
in RuntimePortalPlacementAuthority authority,
|
||||
uint exactCellId)
|
||||
{
|
||||
if (!authority.Present)
|
||||
return authority.IsEmpty;
|
||||
|
||||
return authority.IsValid
|
||||
&& authority.Projection.DestinationCell == exactCellId
|
||||
&& IsCurrentPortalDestination(
|
||||
authority.RevealGeneration,
|
||||
authority.TeleportSequence,
|
||||
exactCellId)
|
||||
&& TryGetHostProjection(
|
||||
authority.Projection,
|
||||
out RuntimeWorldHostProjectionSnapshot host)
|
||||
&& !host.IsSuperseding;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Marks the graphical reservation-release callback as due before the
|
||||
/// host executes it. A thrown callback therefore leaves an exact pending
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue