feat(physics): port retail complete object frame pipeline
Restore the named-retail object update order across local, remote, static, projectile, animation, shadow, teleport, and effect lifetimes. Separate authoritative root commits from spatial rebucketing, preserve per-owner hook/FIFO ordering, and remove update-path allocations with exact lifecycle and residency gates. Add deterministic conformance, adversarial lifetime, GUID-reuse, pending-cell, quaternion, timestamp, and allocation coverage. Release build is warning-free and all 6,446 tests pass with five intentional skips; retail, architecture, and adversarial reviews are clean. Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
parent
31a0889f08
commit
f961d70023
77 changed files with 12513 additions and 1871 deletions
|
|
@ -59,7 +59,7 @@ public static class PhysicsObjUpdate
|
|||
/// must therefore observe any velocity change made by the movement
|
||||
/// callback; moving that callback after reflection changes the result.
|
||||
/// </remarks>
|
||||
public static void CommitSetPositionTransition(
|
||||
public static bool CommitSetPositionTransition(
|
||||
PhysicsBody body,
|
||||
bool inContact,
|
||||
bool onWalkable,
|
||||
|
|
@ -68,7 +68,9 @@ public static class PhysicsObjUpdate
|
|||
bool previousContact,
|
||||
bool previousOnWalkable,
|
||||
Action? hitGround = null,
|
||||
Action? leaveGround = null)
|
||||
Action? leaveGround = null,
|
||||
Func<bool>? isCurrent = null,
|
||||
Func<bool>? isVelocityCurrent = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(body);
|
||||
|
||||
|
|
@ -95,11 +97,26 @@ public static class PhysicsObjUpdate
|
|||
body.TransientState &= ~TransientStateFlags.OnWalkable;
|
||||
|
||||
if (!previousOnWalkable && finalOnWalkable)
|
||||
{
|
||||
hitGround?.Invoke();
|
||||
if (isCurrent?.Invoke() == false)
|
||||
return false;
|
||||
}
|
||||
else if (previousOnWalkable && !finalOnWalkable)
|
||||
{
|
||||
leaveGround?.Invoke();
|
||||
if (isCurrent?.Invoke() == false)
|
||||
return false;
|
||||
}
|
||||
body.calc_acceleration();
|
||||
|
||||
// Position, Vector, and Movement are independently timestamped but
|
||||
// can all install m_velocityVector. If a later one arrived from a
|
||||
// callback above, retain its vector and finish the non-overlapping
|
||||
// contact/pose commit without applying this older collision response.
|
||||
if (isVelocityCurrent?.Invoke() == false)
|
||||
return isCurrent?.Invoke() ?? true;
|
||||
|
||||
HandleAllCollisions(
|
||||
body,
|
||||
collisionNormalValid,
|
||||
|
|
@ -107,6 +124,7 @@ public static class PhysicsObjUpdate
|
|||
previousContact,
|
||||
previousOnWalkable,
|
||||
finalOnWalkable);
|
||||
return isCurrent?.Invoke() ?? true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue