mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-22 11:51:41 +00:00
Merge branch 'monitor-exec' into 'master'
Run linedef exec upon popping a monitor See merge request STJr/SRB2Internal!199
This commit is contained in:
commit
1b7f7ef7cc
2 changed files with 20 additions and 0 deletions
|
@ -3324,6 +3324,11 @@ void A_MonitorPop(mobj_t *actor)
|
||||||
newmobj->sprite = SPR_TV1P;
|
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
|
// Function: A_GoldMonitorPop
|
||||||
|
@ -3407,6 +3412,11 @@ void A_GoldMonitorPop(mobj_t *actor)
|
||||||
newmobj->sprite = SPR_TV1P;
|
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
|
// Function: A_GoldMonitorRestore
|
||||||
|
|
10
src/p_mobj.c
10
src/p_mobj.c
|
@ -10895,6 +10895,16 @@ ML_EFFECT4 : Don't clip inside the ground
|
||||||
mobj->flags2 |= MF2_OBJECTFLIP;
|
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.
|
// Final set of not being able to draw nightsitems.
|
||||||
if (mobj->flags & MF_NIGHTSITEM)
|
if (mobj->flags & MF_NIGHTSITEM)
|
||||||
mobj->flags2 |= MF2_DONTDRAW;
|
mobj->flags2 |= MF2_DONTDRAW;
|
||||||
|
|
Loading…
Reference in a new issue