K_PlayerGuard: always disable if player is in damage state

- Fixes Barrier power-up not being interrupted by damage
  state
This commit is contained in:
James R 2024-01-12 17:56:44 -08:00
parent b6a725ad7b
commit f2f2b41034

View file

@ -10790,6 +10790,11 @@ boolean K_PlayerGuard(const player_t *player)
return false;
}
if (P_PlayerInPain(player) == true)
{
return false;
}
if (K_PowerUpRemaining(player, POWERUP_BARRIER))
{
return true;
@ -10814,7 +10819,6 @@ boolean K_PlayerGuard(const player_t *player)
if (K_PressingEBrake(player) == true
&& (player->drift == 0 || P_IsObjectOnGround(player->mo) == false)
&& P_PlayerInPain(player) == false
&& player->spindashboost == 0
&& player->nocontrol == 0)
{