Merge branch 'monitor-exec' into 'master'

Run linedef exec upon popping a monitor

See merge request STJr/SRB2Internal!199
This commit is contained in:
Digiku 2018-11-13 10:47:37 -05:00
commit 1b7f7ef7cc
2 changed files with 20 additions and 0 deletions

View File

@ -3324,6 +3324,11 @@ void A_MonitorPop(mobj_t *actor)
newmobj->sprite = SPR_TV1P;
}
}
// Run a linedef executor immediately upon popping
// You may want to delay your effects by 18 tics to sync with the reward giving
if (actor->spawnpoint && actor->lastlook)
P_LinedefExecute(actor->lastlook, actor->target, NULL);
}
// Function: A_GoldMonitorPop
@ -3407,6 +3412,11 @@ void A_GoldMonitorPop(mobj_t *actor)
newmobj->sprite = SPR_TV1P;
}
}
// Run a linedef executor immediately upon popping
// You may want to delay your effects by 18 tics to sync with the reward giving
if (actor->spawnpoint && actor->lastlook)
P_LinedefExecute(actor->lastlook, actor->target, NULL);
}
// Function: A_GoldMonitorRestore

View File

@ -10895,6 +10895,16 @@ ML_EFFECT4 : Don't clip inside the ground
mobj->flags2 |= MF2_OBJECTFLIP;
}
// Extra functionality
if (mthing->options & MTF_EXTRA)
{
if (mobj->flags & MF_MONITOR && (mthing->angle & 16384))
{
// Store line exec tag to run upon popping
mobj->lastlook = (mthing->angle & 16383);
}
}
// Final set of not being able to draw nightsitems.
if (mobj->flags & MF_NIGHTSITEM)
mobj->flags2 |= MF2_DONTDRAW;