Add exec to GoldMonitorPop; transfer Angle tag to mobj->lastlook for Lua compat

This commit is contained in:
mazmazz 2018-11-05 07:41:02 -05:00
parent b7c6661c76
commit eb204b6cc4
2 changed files with 17 additions and 2 deletions

View file

@ -3327,8 +3327,8 @@ void A_MonitorPop(mobj_t *actor)
// 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->spawnpoint->options & MTF_EXTRA) && (actor->spawnpoint->angle & 16384))
P_LinedefExecute((actor->spawnpoint->angle & 16383), actor->target, NULL);
if (actor->spawnpoint && actor->lastlook)
P_LinedefExecute(actor->lastlook, actor->target, NULL);
}
// Function: A_GoldMonitorPop
@ -3412,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

@ -10894,6 +10894,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;