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
56
src/AcDream.App/Physics/LiveEntityShadowPublisher.cs
Normal file
56
src/AcDream.App/Physics/LiveEntityShadowPublisher.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using AcDream.App.World;
|
||||
using AcDream.Core.Physics;
|
||||
using AcDream.Core.World;
|
||||
|
||||
namespace AcDream.App.Physics;
|
||||
|
||||
/// <summary>
|
||||
/// Incarnation/residency gate for authoritative ordinary-remote collision
|
||||
/// publication after a canonical rebucket callback.
|
||||
/// </summary>
|
||||
internal static class LiveEntityShadowPublisher
|
||||
{
|
||||
internal static bool TryPublishRemote(
|
||||
LiveEntityRuntime runtime,
|
||||
LiveEntityRecord record,
|
||||
WorldEntity entity,
|
||||
ILiveEntityRemoteMotionRuntime remote,
|
||||
ulong positionAuthorityVersion,
|
||||
Action publish)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(runtime);
|
||||
ArgumentNullException.ThrowIfNull(record);
|
||||
ArgumentNullException.ThrowIfNull(entity);
|
||||
ArgumentNullException.ThrowIfNull(remote);
|
||||
ArgumentNullException.ThrowIfNull(publish);
|
||||
|
||||
if (!CanPublish(
|
||||
runtime,
|
||||
record,
|
||||
entity,
|
||||
remote,
|
||||
positionAuthorityVersion))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
publish();
|
||||
return CanPublish(
|
||||
runtime,
|
||||
record,
|
||||
entity,
|
||||
remote,
|
||||
positionAuthorityVersion);
|
||||
}
|
||||
|
||||
private static bool CanPublish(
|
||||
LiveEntityRuntime runtime,
|
||||
LiveEntityRecord record,
|
||||
WorldEntity entity,
|
||||
ILiveEntityRemoteMotionRuntime remote,
|
||||
ulong positionAuthorityVersion) =>
|
||||
(record.FinalPhysicsState & PhysicsStateFlags.Hidden) == 0
|
||||
&& ReferenceEquals(record.WorldEntity, entity)
|
||||
&& runtime.IsCurrentPositionAuthority(record, positionAuthorityVersion)
|
||||
&& runtime.IsCurrentSpatialRemoteMotion(record, remote);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue