K_InstaWhipCollide: check P_DamageMobj succeeds before applying hitlag to attacker

This commit is contained in:
James R 2023-12-21 21:38:58 -08:00
parent 2d4cc49101
commit 5d91834c60

View file

@ -950,10 +950,12 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim)
shield->extravalue1 = 1;
}
P_DamageMobj(victim, shield, attacker, 1, DMG_NORMAL);
if (P_DamageMobj(victim, shield, attacker, 1, DMG_NORMAL))
{
K_AddHitLag(attacker, attackerHitlag, false);
shield->hitlag = attacker->hitlag;
}
}
return false;
}
}