492: Remove pre-existing thinker when setting up new fade

This commit is contained in:
mazmazz 2018-09-18 07:11:31 -04:00
parent 6567872229
commit 5029c01c2b
1 changed files with 3 additions and 0 deletions

View File

@ -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;