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
|
|
@ -342,7 +342,7 @@ public sealed class RuntimeEntityDirectory
|
|||
AcDream.Core.Physics.PhysicsBody? body)
|
||||
{
|
||||
EnsureKnown(record);
|
||||
record.PhysicsBody = body;
|
||||
record.SetPhysicsBody(body);
|
||||
}
|
||||
|
||||
public void SetPhysicsBodyAcquisitionInProgress(
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ public sealed class RuntimeEntityRecord
|
|||
public uint CanonicalLandblockId { get; internal set; }
|
||||
public uint RawPhysicsState { get; internal set; }
|
||||
public PhysicsStateFlags FinalPhysicsState { get; internal set; }
|
||||
public ulong PhysicsOwnershipEpoch { get; private set; }
|
||||
public ulong SpatialAuthorityVersion { get; private set; }
|
||||
public ulong PlacementCommitVersion { get; private set; }
|
||||
public ulong PhysicsStateMutationVersion { get; private set; }
|
||||
|
|
@ -68,7 +69,7 @@ public sealed class RuntimeEntityRecord
|
|||
/// object reference.
|
||||
/// </summary>
|
||||
public bool HasPartArray { get; internal set; }
|
||||
public PhysicsBody? PhysicsBody { get; internal set; }
|
||||
public PhysicsBody? PhysicsBody { get; private set; }
|
||||
public bool PhysicsBodyAcquisitionInProgress { get; internal set; }
|
||||
public IRuntimeRemoteMotion? RemoteMotion { get; internal set; }
|
||||
public bool RemoteMotionBindingInProgress { get; internal set; }
|
||||
|
|
@ -172,6 +173,14 @@ public sealed class RuntimeEntityRecord
|
|||
FinalPhysicsState = state;
|
||||
}
|
||||
|
||||
internal void SetPhysicsBody(PhysicsBody? body)
|
||||
{
|
||||
if (ReferenceEquals(PhysicsBody, body))
|
||||
return;
|
||||
PhysicsBody = body;
|
||||
PhysicsOwnershipEpoch++;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retail collision reporting clears Missile, AlignPath, and PathClipped
|
||||
/// directly on the live CPhysicsObj. Keep the canonical record and its
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue