From 8af130f79254b37ed2a689f9c022b80e9ba781bc Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 24 Sep 2022 03:05:30 -0700 Subject: [PATCH 1/5] Let Drop Targets collide with other players immediately after being thrown --- src/k_collide.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_collide.c b/src/k_collide.c index 33834e88f..ab0824eb2 100644 --- a/src/k_collide.c +++ b/src/k_collide.c @@ -474,7 +474,7 @@ 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))) From de74808eaacbfd48d60d6db745cb1afa3b2a7f67 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 24 Sep 2022 03:05:52 -0700 Subject: [PATCH 2/5] Let Drop Targets collide with other items immediately after being thrown see efc415e5 --- src/k_collide.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_collide.c b/src/k_collide.c index ab0824eb2..f2fc379ae 100644 --- a/src/k_collide.c +++ b/src/k_collide.c @@ -477,7 +477,7 @@ boolean K_DropTargetCollide(mobj_t *t1, mobj_t *t2) 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) From b2913b9a190ea7817effe472dc16fbf0bf299b47 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 24 Sep 2022 03:46:41 -0700 Subject: [PATCH 3/5] Let Drop Targets hit the thrower immediately after bouncing off a wall --- src/p_mobj.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index d9920a928..90b31b1bc 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; } From b2268157fda15b6e948d1777bc78004f0024b90b Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 24 Sep 2022 04:22:30 -0700 Subject: [PATCH 4/5] Fix type check for Land Mines vs Drop Target/Bubble Shield expand Fixes Drop Targets not pushing Land Mines. --- src/p_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index 1f7051c10..72d96885b 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -931,7 +931,7 @@ 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_PLAYER && tm.thing->target != thing))) { @@ -967,7 +967,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))) { From 7a8a377d930b88b667d493ea8c8e6a56725ef662 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 24 Sep 2022 05:04:24 -0700 Subject: [PATCH 5/5] Bubble reflect Drop Targets --- src/k_collide.c | 2 +- src/p_map.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/k_collide.c b/src/k_collide.c index f2fc379ae..ee773dfa3 100644 --- a/src/k_collide.c +++ b/src/k_collide.c @@ -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 72d96885b..bb1953414 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 @@ -933,6 +934,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) || thing->type == MT_BANANA || thing->type == MT_EGGMANITEM || thing->type == MT_BALLHOG || 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