From 7ba3d008f26bd83cfeaf08f5b140d15978519e1d Mon Sep 17 00:00:00 2001 From: minenice55 Date: Tue, 17 Feb 2026 21:52:47 -0500 Subject: [PATCH] put bubble shield reflect sooner --- src/p_map.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index 1d4974e4e..636ad199a 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -719,6 +719,32 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) return BMIT_CONTINUE; } + // Bubble Shield reflect + if (thing->type == MT_BUBBLESHIELD && !P_MobjWasRemoved(thing->target) && thing->target->player && thing->target->player->bubbleblowup) + { + // see if it went over / under + if (g_tm.thing->z > thing->z + thing->height) + return BMIT_CONTINUE; // overhead + if (g_tm.thing->z + g_tm.thing->height < thing->z) + return BMIT_CONTINUE; // underneath + + return K_BubbleShieldCollide(thing, g_tm.thing) ? BMIT_CONTINUE : BMIT_ABORT; + } + else if (g_tm.thing->type == MT_BUBBLESHIELD && !P_MobjWasRemoved(g_tm.thing->target) && g_tm.thing->target->player && g_tm.thing->target->player->bubbleblowup) + { + // see if it went over / under + if (g_tm.thing->z > thing->z + thing->height) + return BMIT_CONTINUE; // overhead + if (g_tm.thing->z + g_tm.thing->height < thing->z) + return BMIT_CONTINUE; // underneath + + return K_BubbleShieldCollide(g_tm.thing, thing) ? BMIT_CONTINUE : BMIT_ABORT; + } + + // double make sure bubbles won't collide with anything else + if (thing->type == MT_BUBBLESHIELD || g_tm.thing->type == MT_BUBBLESHIELD) + return BMIT_CONTINUE; + if (thing->flags & MF_PAIN) { // Player touches painful thing sitting on the floor // see if it went over / under @@ -779,32 +805,6 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) return K_SMKIceBlockCollide(thing, g_tm.thing) ? BMIT_CONTINUE : BMIT_ABORT; } - // Bubble Shield reflect - if (thing->type == MT_BUBBLESHIELD && !P_MobjWasRemoved(thing->target) && thing->target->player && thing->target->player->bubbleblowup) - { - // see if it went over / under - if (g_tm.thing->z > thing->z + thing->height) - return BMIT_CONTINUE; // overhead - if (g_tm.thing->z + g_tm.thing->height < thing->z) - return BMIT_CONTINUE; // underneath - - return K_BubbleShieldCollide(thing, g_tm.thing) ? BMIT_CONTINUE : BMIT_ABORT; - } - else if (g_tm.thing->type == MT_BUBBLESHIELD && !P_MobjWasRemoved(g_tm.thing->target) && g_tm.thing->target->player && g_tm.thing->target->player->bubbleblowup) - { - // see if it went over / under - if (g_tm.thing->z > thing->z + thing->height) - return BMIT_CONTINUE; // overhead - if (g_tm.thing->z + g_tm.thing->height < thing->z) - return BMIT_CONTINUE; // underneath - - return K_BubbleShieldCollide(g_tm.thing, thing) ? BMIT_CONTINUE : BMIT_ABORT; - } - - // double make sure bubbles won't collide with anything else - if (thing->type == MT_BUBBLESHIELD || g_tm.thing->type == MT_BUBBLESHIELD) - return BMIT_CONTINUE; - if (g_tm.thing->type == MT_EGGMANITEM || g_tm.thing->type == MT_EGGMANITEM_SHIELD) { // see if it went over / under