diff --git a/src/k_collide.c b/src/k_collide.c index 33834e88f..ee773dfa3 100644 --- a/src/k_collide.c +++ b/src/k_collide.c @@ -474,10 +474,10 @@ boolean K_DropTargetCollide(mobj_t *t1, mobj_t *t2) { mobj_t *draggeddroptarget = (t1->type == MT_DROPTARGET_SHIELD) ? t1->target : NULL; - if ((t1->threshold > 0 && (t2->hitlag > 0 || !draggeddroptarget)) || (t2->threshold > 0 && t1->hitlag > 0)) + if ((t1->threshold > 0 && t2->hitlag > 0) || (t2->threshold > 0 && t1->hitlag > 0)) return true; - if (((t1->target == t2) || (t1->target == t2->target)) && (t1->threshold > 0 || (t2->type != MT_PLAYER && t2->threshold > 0))) + if (((t1->target == t2) || (t1->target == t2->target)) && ((t1->threshold > 0 && t2->type == MT_PLAYER) || (t2->type != MT_PLAYER && t2->threshold > 0))) return true; if (t1->health <= 0 || t2->health <= 0) @@ -711,7 +711,7 @@ boolean K_BubbleShieldCollide(mobj_t *t1, mobj_t *t2) } else { - if (!t2->threshold) + if (!t2->threshold || t2->type == MT_DROPTARGET) { if (!t2->momx && !t2->momy) { diff --git a/src/p_map.c b/src/p_map.c index 8c5751d2a..a02a5191d 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -917,6 +917,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) || tm.thing->type == MT_BANANA || tm.thing->type == MT_EGGMANITEM || tm.thing->type == MT_BALLHOG || tm.thing->type == MT_SSMINE || tm.thing->type == MT_LANDMINE || tm.thing->type == MT_SINK || tm.thing->type == MT_GARDENTOP + || tm.thing->type == MT_DROPTARGET || (tm.thing->type == MT_PLAYER && thing->target != tm.thing))) { // see if it went over / under @@ -931,8 +932,9 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) || (tm.thing->player && tm.thing->player->bubbleblowup)) && (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_GACHABOM || thing->type == MT_BANANA || thing->type == MT_EGGMANITEM || thing->type == MT_BALLHOG - || thing->type == MT_SSMINE || tm.thing->type == MT_LANDMINE || thing->type == MT_SINK + || thing->type == MT_SSMINE || thing->type == MT_LANDMINE || thing->type == MT_SINK || thing->type == MT_GARDENTOP + || thing->type == MT_DROPTARGET || (thing->type == MT_PLAYER && tm.thing->target != thing))) { // see if it went over / under @@ -967,7 +969,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) else if ((tm.thing->type == MT_DROPTARGET || tm.thing->type == MT_DROPTARGET_SHIELD) && (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_GACHABOM || thing->type == MT_BANANA || thing->type == MT_EGGMANITEM || thing->type == MT_BALLHOG - || thing->type == MT_SSMINE || tm.thing->type == MT_LANDMINE || thing->type == MT_SINK + || thing->type == MT_SSMINE || thing->type == MT_LANDMINE || thing->type == MT_SINK || thing->type == MT_GARDENTOP || (thing->type == MT_PLAYER))) { diff --git a/src/p_mobj.c b/src/p_mobj.c index 232812765..3f0481a94 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1791,6 +1791,8 @@ void P_XYMovement(mobj_t *mo) { S_StartSound(mo, mo->info->attacksound); mo->health--; + // This prevents an item thrown at a wall from + // phasing through you on its return. mo->threshold = 0; } /*FALLTHRU*/ @@ -1811,6 +1813,12 @@ void P_XYMovement(mobj_t *mo) S_StartSound(mo, sfx_s3k44); // Bubble bounce break; + case MT_DROPTARGET: + // This prevents an item thrown at a wall from + // phasing through you on its return. + mo->threshold = 0; + break; + default: break; }