feat(runtime): publish dormant local physics ownership
This commit is contained in:
parent
442cb8f97b
commit
22651c823d
10 changed files with 1617 additions and 25 deletions
|
|
@ -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) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue