From 5029c01c2b4e9ae9cfba49e76e805b0f73e817cf Mon Sep 17 00:00:00 2001 From: mazmazz Date: Tue, 18 Sep 2018 07:11:31 -0400 Subject: [PATCH] 492: Remove pre-existing thinker when setting up new fade --- src/p_polyobj.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/p_polyobj.c b/src/p_polyobj.c index bbcf4f42a..c2b3ba399 100644 --- a/src/p_polyobj.c +++ b/src/p_polyobj.c @@ -2969,6 +2969,9 @@ INT32 EV_DoPolyObjFade(polyfadedata_t *pfdata) if (po->translucency == pfdata->destvalue) return 1; + if (po->thinker && po->thinker->function.acp1 == (actionf_p1)T_PolyObjFade) + P_RemoveThinker(po->thinker); + // create a new thinker th = Z_Malloc(sizeof(polyfade_t), PU_LEVSPEC, NULL); th->thinker.function.acp1 = (actionf_p1)T_PolyObjFade;