feat(net): port retail physics spawn and event timestamps
Parse the complete PhysicsDesc plus F754/F755 packets, correct every PhysicsState bit, and gate all nine retail update channels with generation-safe immutable snapshots. Preserve ForcePosition, teleport, placement, velocity, parent, pickup, delete, and same-generation CreateObject ordering from the named client. Separate accepted logical lifecycle notifications from retained UI qualities, make GUID replacement and session reset clear every projection exactly once, and add packet, wraparound, malformed-input, parent FIFO, canonical-position, reconnect, and GUID-reuse conformance coverage. Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
parent
d53fe30ffe
commit
8a5d77f7f4
50 changed files with 3809 additions and 649 deletions
|
|
@ -19,18 +19,27 @@ namespace AcDream.Core.Physics;
|
|||
// ────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>
|
||||
/// State flags stored at struct offset +0xA8 (PhysicsState).
|
||||
/// Only the flags relevant to this simulation layer are included.
|
||||
/// State flags stored at struct offset +0xA8 (<c>PhysicsState</c>), verbatim
|
||||
/// from the retail <c>PhysicsState</c> enum in <c>acclient.h:2815</c>.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum PhysicsStateFlags : uint
|
||||
{
|
||||
None = 0,
|
||||
Static = 0x00000001, // bit 0 — never moves
|
||||
Ethereal = 0x00000004, // bit 2 — no collision
|
||||
ReportCollisions = 0x00000010,
|
||||
Gravity = 0x00000400, // bit 10 — apply downward gravity
|
||||
Hidden = 0x00001000,
|
||||
None = 0x00000000,
|
||||
Static = 0x00000001,
|
||||
Ethereal = 0x00000004,
|
||||
ReportCollisions = 0x00000008,
|
||||
IgnoreCollisions = 0x00000010,
|
||||
NoDraw = 0x00000020,
|
||||
Missile = 0x00000040,
|
||||
Pushable = 0x00000080,
|
||||
AlignPath = 0x00000100,
|
||||
PathClipped = 0x00000200,
|
||||
Gravity = 0x00000400,
|
||||
Lighting = 0x00000800,
|
||||
ParticleEmitter = 0x00001000,
|
||||
Hidden = 0x00004000,
|
||||
ScriptedCollision = 0x00008000,
|
||||
/// <summary>
|
||||
/// A6.P7 (2026-05-25): retail HAS_PHYSICS_BSP_PS bit
|
||||
/// (acclient.h:2833). When set, the entity exposes a per-Setup
|
||||
|
|
@ -43,7 +52,7 @@ public enum PhysicsStateFlags : uint
|
|||
/// state 0x10008 (STATIC | REPORT_COLLISIONS | HAS_PHYSICS_BSP).
|
||||
/// ACE name: <c>PhysicsState.HasPhysicsBSP</c>.
|
||||
/// </summary>
|
||||
HasPhysicsBsp = 0x00010000, // bit 16 — retail HAS_PHYSICS_BSP_PS
|
||||
HasPhysicsBsp = 0x00010000,
|
||||
/// <summary>
|
||||
/// L.3a (2026-04-30): retail INELASTIC_PS bit (acclient.h:2834).
|
||||
/// When set, wall-collisions zero the velocity instead of reflecting.
|
||||
|
|
@ -51,8 +60,14 @@ public enum PhysicsStateFlags : uint
|
|||
/// impact rather than bounce. The player NEVER has this flag set —
|
||||
/// player wall-hits use the reflection path with elasticity ~0.05.
|
||||
/// </summary>
|
||||
Inelastic = 0x00020000, // bit 17 — retail INELASTIC_PS
|
||||
Sledding = 0x00800000, // bit 23 — sledding (modified friction)
|
||||
Inelastic = 0x00020000,
|
||||
HasDefaultAnim = 0x00040000,
|
||||
HasDefaultScript = 0x00080000,
|
||||
Cloaked = 0x00100000,
|
||||
ReportAsEnvironment = 0x00200000,
|
||||
EdgeSlide = 0x00400000,
|
||||
Sledding = 0x00800000,
|
||||
Frozen = 0x01000000,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue