Don't Guard Break if other player is in pain state

This commit is contained in:
James R 2023-06-30 00:47:14 -07:00
parent 609b0c0ae0
commit d4b0ee21ab

View file

@ -3769,6 +3769,9 @@ void K_DoGuardBreak(mobj_t *t1, mobj_t *t2) {
if (!(t1->player && t2->player)) if (!(t1->player && t2->player))
return; return;
if (P_PlayerInPain(t2->player))
return;
// short-circuit instashield for vfx visibility // short-circuit instashield for vfx visibility
t1->player->instaShieldCooldown = GUARDBREAK_COOLDOWN; t1->player->instaShieldCooldown = GUARDBREAK_COOLDOWN;
t1->player->guardCooldown = GUARDBREAK_COOLDOWN; t1->player->guardCooldown = GUARDBREAK_COOLDOWN;