using Unity.Entities;
using Unity.Mathematics;
namespace ProjectM.Simulation
{
///
/// SERVER-ONLY transient knockback on a Husk. While has not elapsed, EnemyAISystem
/// moves the Husk along at (REPLACING its seek) and suppresses its strike.
/// Stamped by ProjectileDamageSystem on a hit (Dir = the projectile's heading). NOT a [GhostField] — the Husk's
/// displaced position already replicates via the stock LocalTransform default variant, so knockback adds NO
/// replicated surface (no ghost re-bake). EnemyAISystem must remain the SOLE writer of the Husk's Position, so
/// knockback is applied INSIDE it (never a competing system). Force/duration live in
/// (KnockbackSpeed = 0 disables knockback globally).
///
public struct KnockbackState : IComponentData
{
/// Planar (XZ) knockback heading — the projectile's direction at impact.
public float2 Dir;
/// Knockback speed (world units/sec) applied for the window; 0 = not knocked.
public float Speed;
/// Server tick until which the knockback is active (0 = none; scheduled via TickUtil.NonZero).
public uint UntilTick;
}
}