From 004cfb45aa2edbc9a1b1a18a26372822896e4ef5 Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 8 Jan 2020 22:36:29 +0000 Subject: [PATCH] Allow Rollout Rocks that are being ridden to: * Break bustable FOFs like pushables. * Activate pushable-counting executor activators. * Get pushed by currents/wind. This takes advantage of the previously-existing hack relating to objects with MF_PUSHABLE infotable (but not active) flags and a nonzero fuse, which is used as the condition to group this under (rather than MT_ROLLOUTROCK specific fuckery). Thanks to the bug report submitted by our kirbs pal for getting me off my ass this evening. --- src/p_enemy.c | 7 ++----- src/p_mobj.c | 2 +- src/p_spec.c | 5 +++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index ce201844f..bd7b81d40 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -14603,12 +14603,9 @@ void A_RolloutRock(mobj_t *actor) if (!actor->tracer || P_MobjWasRemoved(actor->tracer) || !actor->tracer->health) actor->flags |= MF_PUSHABLE; - if (!(actor->flags & MF_PUSHABLE)) // if being ridden, don't disappear - actor->fuse = 0; - else if (!actor->fuse && actor->movecount == 1) // otherwise if rock has moved, set its fuse + if (!(actor->flags & MF_PUSHABLE) || (actor->movecount != 1)) // if being ridden or haven't moved, don't disappear actor->fuse = actor->info->painchance; - - if (actor->fuse && actor->fuse < 2*TICRATE) + else if (actor->fuse < 2*TICRATE) actor->flags2 ^= MF2_DONTDRAW; } diff --git a/src/p_mobj.c b/src/p_mobj.c index b771103a9..1b2fc7d6a 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1892,7 +1892,7 @@ void P_XYMovement(mobj_t *mo) #endif // Pushables can break some blocks - if (CheckForBustableBlocks && mo->flags & MF_PUSHABLE) + if (CheckForBustableBlocks && ((mo->flags & MF_PUSHABLE) || ((mo->info->flags & MF_PUSHABLE) && mo->fuse))) P_PushableCheckBustables(mo); if (!P_TryMove(mo, mo->x + xmove, mo->y + ymove, true) diff --git a/src/p_spec.c b/src/p_spec.c index cc0b185ad..f2cb17e0e 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1887,7 +1887,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller while (node) { mo = node->m_thing; - if (mo->flags & MF_PUSHABLE) + if ((mo->flags & MF_PUSHABLE) || ((mo->info->flags & MF_PUSHABLE) && mo->fuse)) numpush++; node = node->m_thinglist_next; } @@ -8974,7 +8974,8 @@ void T_Pusher(pusher_t *p) || thing->type == MT_EXTRALARGEBUBBLE)) continue; - if (!(thing->flags & MF_PUSHABLE) && !(thing->type == MT_PLAYER + if (!((thing->flags & MF_PUSHABLE) || ((thing->info->flags & MF_PUSHABLE) && thing->fuse)) + && !(thing->type == MT_PLAYER || thing->type == MT_SMALLBUBBLE || thing->type == MT_MEDIUMBUBBLE || thing->type == MT_EXTRALARGEBUBBLE