e362aaeb43
Add BefourStudios SciFi environment packs, Gabriel Aguiar VFX, and the ShaderCrew Toon Shader embedded packages, plus combat/enemy/wave/death gameplay systems and supporting vault docs/screenshots. Rename 11 vendor textures from uppercase .PNG/.HDR to lowercase so the case-sensitive Git LFS filters (*.png/*.hdr) match on case-sensitive filesystems (Linux CI, case-sensitive macOS), not just locally where core.ignorecase=true masks the gap. Each .meta moved with its asset so GUID references are preserved. All ~1000 binaries tracked via LFS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
43 lines
2.1 KiB
C#
43 lines
2.1 KiB
C#
using Unity.Entities;
|
|
using Unity.NetCode;
|
|
|
|
namespace ProjectM.Simulation
|
|
{
|
|
/// <summary>
|
|
/// Enableable, LOCAL (not replicated) "is dead" gate for a player. Derived every predicted tick from the
|
|
/// replicated <see cref="Health"/> by <see cref="PlayerDeathStateSystem"/> (Dead == Health.Current <= 0) —
|
|
/// exactly the derive-don't-replicate idiom of <see cref="EffectiveCharacterStats"/>/<c>StatRecomputeSystem</c>,
|
|
/// so it is identical on server + owner-predicted client and rollback-correct with no replicated enabled bit.
|
|
/// Baked DISABLED (the player spawns alive). Movement/aim/fire systems query <c>.WithDisabled<Dead>()</c>
|
|
/// so a dead player is frozen and can't act.
|
|
/// </summary>
|
|
public struct Dead : IComponentData, IEnableableComponent { }
|
|
|
|
/// <summary>
|
|
/// Server-only respawn timer for a player. NOT replicated — recovery is server-authoritative and the refilled
|
|
/// <see cref="Health"/> (GhostField) + repositioned LocalTransform replicate instead. <see cref="RespawnTick"/>
|
|
/// == 0 means "no respawn pending / alive"; <see cref="DelayTicks"/> is the baked down-time before recovery.
|
|
/// </summary>
|
|
public struct RespawnState : IComponentData
|
|
{
|
|
/// <summary>Raw server tick at which to respawn; 0 = none pending.</summary>
|
|
public uint RespawnTick;
|
|
|
|
/// <summary>Ticks the player stays down before recovering (~60 ticks/sec).</summary>
|
|
public int DelayTicks;
|
|
|
|
/// <summary>Ticks of post-respawn damage immunity granted on recovery (~60 ticks/sec).</summary>
|
|
public int InvulnTicks;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Replicated post-respawn damage-immunity window. <c>UntilTick</c> = the raw server tick until which the
|
|
/// player ignores damage; 0 = none. Set server-side by <c>PlayerRespawnSystem</c> on recovery, enforced by
|
|
/// <c>HealthApplyDamageSystem</c>, and a <c>[GhostField]</c> so the client HUD can show a SHIELDED cue.
|
|
/// </summary>
|
|
public struct RespawnInvuln : IComponentData
|
|
{
|
|
[GhostField] public uint UntilTick;
|
|
}
|
|
}
|