diff --git a/src/d_player.h b/src/d_player.h index cf7788101..6e92e753a 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -139,8 +139,9 @@ typedef enum PF2_SELFDEAFEN = 1<<2, PF2_SERVERMUTE = 1<<3, PF2_SERVERDEAFEN = 1<<4, - PF2_STRICTFASTFALL = 1<<5, - PF2_ALWAYSDAMAGED = 1<<6, + PF2_STRICTFASTFALL = 1<<5, // Fastfall only with C, never with A+X. Profile preference. + PF2_ALWAYSDAMAGED = 1<<6, // Ignore invulnerability or clash conditions when evaulating damage (P_DamageMobj). Unset after use! + PF2_BUBBLECONTACT = 1<<7, // ACHTUNG VERY BAD HACK - Don't allow Bubble Shield to contact certain objects unless this is a fresh blowup. } pflags2_t; typedef enum diff --git a/src/k_kart.c b/src/k_kart.c index 81e34e7bb..c5a0d90ff 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -10627,6 +10627,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) player->bubblecool = 0; } + if (player->bubbleblowup == 0) + player->pflags2 &= ~PF2_BUBBLECONTACT; + if (player->itemtype != KITEM_FLAMESHIELD) { if (player->flamedash) diff --git a/src/objects/ball-switch.cpp b/src/objects/ball-switch.cpp index 778c94dff..4032edc73 100644 --- a/src/objects/ball-switch.cpp +++ b/src/objects/ball-switch.cpp @@ -214,6 +214,13 @@ struct BallSwitch_Ball : mobj_t void Hit(mobj_t *inflictor, mobj_t *source) { + if (inflictor->type == MT_BUBBLESHIELD && source->player) + { + if (source->player->pflags2 & PF2_BUBBLECONTACT) + return; + source->player->pflags2 |= PF2_BUBBLECONTACT; + } + Push(inflictor, 64 << FRACBITS, 1 << FRACBITS); K_SetHitLagForObjects(this, inflictor, source, 4, true);