From c68e0d46c008af7b928941095346f7e247acb90f Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 13 Mar 2022 17:00:43 +0000 Subject: [PATCH] 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) --- src/k_collide.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/k_collide.c b/src/k_collide.c index 21f028465..c0f4a95e8 100644 --- a/src/k_collide.c +++ b/src/k_collide.c @@ -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) {