Fix Bubble Shield duplicate collisions

8c1771112c
This commit is contained in:
NepDisk 2025-02-27 12:34:28 -05:00
parent 5e26516453
commit b048467aa2
2 changed files with 14 additions and 1 deletions

View file

@ -717,6 +717,17 @@ void K_ThunderShieldAttack(mobj_t *actor, fixed_t size)
boolean K_BubbleShieldCollide(mobj_t *t1, mobj_t *t2)
{
if (t1->type == MT_PLAYER)
{
// Bubble Shield already has a hitbox, and it gets
// teleported every tic so the Bubble itself will
// always make contact with other objects.
//
// Therefore, we don't need a second, smaller hitbox
// on the player.
return true;
}
if (t2->type == MT_PLAYER)
{
// Counter desyncs
@ -734,7 +745,7 @@ boolean K_BubbleShieldCollide(mobj_t *t1, mobj_t *t2)
return true;
// Player Damage
P_DamageMobj(t2, ((t1->type == MT_BUBBLESHIELD) ? t1->target : t1), t1, 1, DMG_NORMAL);
P_DamageMobj(t2, t1->target, t1, 1, DMG_NORMAL);
if (t1->target->player)
{

View file

@ -7414,7 +7414,9 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
mobj->extravalue2 = mobj->target->player->bubbleblowup;
P_SetScale(mobj, (mobj->destscale = scale));
mobj->flags &= ~(MF_NOCLIPTHING);
P_MoveOrigin(mobj, mobj->target->x, mobj->target->y, mobj->target->z);
mobj->flags |= MF_NOCLIPTHING;
break;
}
case MT_FLAMESHIELD: