34 lines
1.7 KiB
C#
34 lines
1.7 KiB
C#
using Unity.Entities;
|
|
using Unity.Mathematics;
|
|
|
|
namespace ProjectM.Simulation
|
|
{
|
|
/// <summary>
|
|
/// MC-1 — predicted, NON-replicated dash window on the owner-predicted player. A SHAPE-clone of
|
|
/// <c>KnockbackState</c>, but UNLIKE KnockbackState it lives on a PREDICTED player and is re-simulated from
|
|
/// the replicated <see cref="PlayerInput.Dash"/> InputEvent every predicted tick — so it is authoritative on
|
|
/// the server at the tick <c>HealthApplyDamageSystem</c> drains damage, even for a melee strike appended a
|
|
/// tick earlier in the plain group. All ticks routed through <c>TickUtil.NonZero</c>; compared via
|
|
/// <see cref="Unity.NetCode.NetworkTick"/> only (never raw uint). NOT a <c>[GhostField]</c> (no player-ghost
|
|
/// re-bake). Baked all-zero (idle).
|
|
/// </summary>
|
|
public struct DashState : IComponentData
|
|
{
|
|
/// <summary>Planar XZ dash heading, captured at dash-start.</summary>
|
|
public float2 Dir;
|
|
|
|
/// <summary>Raw ServerTick at dash-start (NonZero-coerced). Lower (inclusive) bound of the i-frame window.</summary>
|
|
public uint StartTick;
|
|
|
|
/// <summary>StartTick + i-frame window (NonZero). I-frames cover the HALF-OPEN range [StartTick, IFrameUntilTick).</summary>
|
|
public uint IFrameUntilTick;
|
|
|
|
/// <summary>IFrameUntilTick + recovery tail (NonZero). Movement-lock tail (no i-frames) so a panic-dash is punishable.</summary>
|
|
public uint RecoverUntilTick;
|
|
|
|
/// <summary>Hits negated by THIS dash's i-frame window. SERVER-written (HealthApplyDamageSystem);
|
|
/// 0 at window-close = a wasted dash (DevTelemetry.DashesWasted spam signal). The client copy stays 0.</summary>
|
|
public uint NegatedCount;
|
|
}
|
|
}
|