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.
This commit is contained in:
toaster 2020-01-08 22:36:29 +00:00
parent 7deb18bdc9
commit 004cfb45aa
3 changed files with 6 additions and 8 deletions

View file

@ -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;
}

View file

@ -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)

View file

@ -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