From ae5b02bccd8cbc05cd1880c776823ec0d9e1ee84 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Tue, 18 Sep 2018 07:06:59 -0400 Subject: [PATCH] 492: Don't interrupt existing polyobj fader unless EFFECT5 --- src/p_spec.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/p_spec.c b/src/p_spec.c index 2583c24f3..481580b79 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -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