Vault Re-Alignment

This commit is contained in:
2026-06-09 23:26:20 -07:00
parent a7405c3f38
commit da522efe7a
63 changed files with 119048 additions and 15 deletions
@@ -27,15 +27,28 @@ namespace ProjectM.Simulation
[BurstCompile]
public void OnUpdate(ref SystemState state)
{
foreach (var (health, control, deadEnabled) in
foreach (var (health, control, deadEnabled, entity) in
SystemAPI.Query<RefRO<Health>, RefRW<CharacterControl>, EnabledRefRW<Dead>>()
.WithAll<PlayerTag, Simulate>()
.WithPresent<Dead>())
.WithPresent<Dead>()
.WithEntityAccess())
{
bool isDead = health.ValueRO.Current <= 0f;
deadEnabled.ValueRW = isDead;
if (isDead)
{
control.ValueRW.MoveVelocity = float3.zero;
// MC-1: clear any in-flight dash window + restore base sharpness so a death mid-dash leaves
// no stale i-frames / stuck-fast on respawn (DashSystem skips dead players via .WithDisabled<Dead>()).
if (SystemAPI.HasComponent<DashState>(entity))
SystemAPI.SetComponent(entity, default(DashState));
if (SystemAPI.HasComponent<CharacterComponent>(entity))
{
var cc = SystemAPI.GetComponent<CharacterComponent>(entity);
cc.GroundedMovementSharpness = 15f;
SystemAPI.SetComponent(entity, cc);
}
}
}
}
}