feat(runtime): atomically replace collision generations

This commit is contained in:
Erik 2026-08-01 17:33:34 +02:00
parent 99bf1751bb
commit 9b0f59bd1b
21 changed files with 2435 additions and 408 deletions

View file

@ -388,6 +388,14 @@ internal sealed class RuntimeLocalPlayerPhysicsPublicationState : IDisposable
return RuntimeLocalPlayerPhysicsPublicationStatus.RejectedAuthority;
}
// Seal the exact SetPosition owner before the irreversible no-fail
// suffix. Any internal invariant failure therefore leaves every
// canonical body/controller owner untouched.
_physics.SetPosition.PrepareDormantLocalActivationOwnership(
candidate.Record,
candidate.Body,
candidate.PreparedActivation.Token.Placement);
// All validation is complete. The remaining stores are callback-free,
// non-allocating, and cannot fail on this single Runtime update thread.
// The controller remains RuntimeOwnedDormant; the subsequent world