using Unity.Entities; namespace ProjectM.Simulation { /// /// One pending hit against a damageable entity, queued as a per-entity buffer element. The server /// appends a DamageEvent when a projectile hits (ProjectileDamageSystem), then HealthApplyDamageSystem /// drains the buffer once per tick to subtract from Health. Buffering decouples hit detection from /// health resolution and lets multiple simultaneous hits accumulate before being applied. Not /// replicated — only Health.Current is a GhostField; the buffer is server-side and cleared each tick. /// public struct DamageEvent : IBufferElementData { /// Damage to subtract from the target's Health.Current (world health units). public float Amount; /// NetworkId of the firing player that caused this hit (attribution / self-hit filtering upstream). public int SourceNetworkId; /// Raw ServerTick at which this hit logically LANDS (the appending tick), stamped via /// TickUtil.NonZero at every append site (0 = unstamped). The dash i-frame negation compares it /// against the dashing player's DashState window, so a strike appended a tick before it is /// drained is judged against the tick it was AUTHORED, not the tick it was applied. public uint SourceTick; } }