Fixed sneaker-induced bumper theft (for those who saw my comment in MKD, turns out a simple P_PlayerInPain saves you from the multi-steal threat I considered)

This commit is contained in:
toaster 2022-03-13 17:00:43 +00:00
parent b9acad707e
commit c68e0d46c0

View file

@ -570,8 +570,12 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
// (Pogo Spring damage is handled in head-stomping code)
if (gametyperules & GTR_BUMPERS)
{
t1Condition = (t1->player->sneakertimer > 0 && t1->player->flashing != 0);
t2Condition = (t2->player->sneakertimer > 0 && t2->player->flashing != 0);
t1Condition = ((t1->player->sneakertimer > 0)
&& !P_PlayerInPain(t1->player)
&& (t1->player->flashing == 0));
t2Condition = ((t2->player->sneakertimer > 0)
&& !P_PlayerInPain(t2->player)
&& (t2->player->flashing == 0));
if (t1Condition == true && t2Condition == false)
{