492: Don't interrupt existing polyobj fader unless EFFECT5

This commit is contained in:
mazmazz 2018-09-18 07:06:59 -04:00
parent 17e23f55eb
commit 6567872229
1 changed files with 10 additions and 1 deletions

View File

@ -1276,7 +1276,7 @@ static boolean PolyFade(line_t *line)
if (!(po = Polyobj_GetForNum(polyObjNum)))
{
CONS_Debug(DBG_POLYOBJ, "EV_DoPolyObjWaypoint: bad polyobj %d\n", polyObjNum);
CONS_Debug(DBG_POLYOBJ, "PolyFade: bad polyobj %d\n", polyObjNum);
return 0;
}
@ -1284,6 +1284,15 @@ static boolean PolyFade(line_t *line)
if (po->isBad)
return 0;
// Prevent continuous execs from interfering on an existing fade
if (!(line->flags & ML_EFFECT5)
&& po->thinker
&& po->thinker->function.acp1 == (actionf_p1)T_PolyObjFade)
{
CONS_Debug(DBG_POLYOBJ, "Line type 492 Executor: Fade PolyObject thinker already exists\n");
return 0;
}
pfd.polyObjNum = polyObjNum;
// if DONTPEGBOTTOM, specify raw translucency value in Front X Offset