From 5d91834c606a7b6649ce61f457c3de81d9b97dc5 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 21 Dec 2023 21:38:58 -0800 Subject: [PATCH] K_InstaWhipCollide: check P_DamageMobj succeeds before applying hitlag to attacker --- src/k_collide.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/k_collide.cpp b/src/k_collide.cpp index 8c4a0c078..c1fe27c6e 100644 --- a/src/k_collide.cpp +++ b/src/k_collide.cpp @@ -950,9 +950,11 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim) shield->extravalue1 = 1; } - P_DamageMobj(victim, shield, attacker, 1, DMG_NORMAL); - K_AddHitLag(attacker, attackerHitlag, false); - shield->hitlag = attacker->hitlag; + if (P_DamageMobj(victim, shield, attacker, 1, DMG_NORMAL)) + { + K_AddHitLag(attacker, attackerHitlag, false); + shield->hitlag = attacker->hitlag; + } } return false; }