feat(runtime): publish dormant local physics ownership

This commit is contained in:
Erik 2026-08-01 10:01:30 +02:00
parent 442cb8f97b
commit 22651c823d
10 changed files with 1617 additions and 25 deletions

View file

@ -573,6 +573,30 @@ internal sealed class RuntimeSetPositionState : IDisposable
return RuntimeSetPositionMoverPreparationStatus.Prepared;
}
internal bool IsExactPreparedPlacementCurrent(
RuntimeEntityRecord record,
in RuntimeEntityPlacementToken token,
in RuntimeSetPositionCommand command)
{
EnsureNotDisposed();
ArgumentNullException.ThrowIfNull(record);
return token.IsValid
&& token.Entity == record.Key
&& _operations.TryGetValue(token.Entity, out Operation? operation)
&& ReferenceEquals(operation.Record, record)
&& operation.Token == token
&& operation.Stage
is RuntimeEntityPlacementStage.AwaitingPreparation
&& IsCurrent(operation)
&& _moverPreparationAuthorities.TryGetValue(
token.Entity,
out MoverPreparationAuthority authority)
&& authority.OperationId == token.OperationId
&& authority.Prepared
&& authority.PreparedCommand == command
&& IsPreparationAuthorityCurrent(operation, authority);
}
internal RuntimeSetPositionOutcome SubmitPreparedPlacement(
in RuntimeEntityPlacementToken token,
in RuntimeSetPositionCommand command) =>