492: Remove pre-existing thinker when setting up new fade
This commit is contained in:
parent
6567872229
commit
5029c01c2b
|
@ -2969,6 +2969,9 @@ INT32 EV_DoPolyObjFade(polyfadedata_t *pfdata)
|
||||||
if (po->translucency == pfdata->destvalue)
|
if (po->translucency == pfdata->destvalue)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
if (po->thinker && po->thinker->function.acp1 == (actionf_p1)T_PolyObjFade)
|
||||||
|
P_RemoveThinker(po->thinker);
|
||||||
|
|
||||||
// create a new thinker
|
// create a new thinker
|
||||||
th = Z_Malloc(sizeof(polyfade_t), PU_LEVSPEC, NULL);
|
th = Z_Malloc(sizeof(polyfade_t), PU_LEVSPEC, NULL);
|
||||||
th->thinker.function.acp1 = (actionf_p1)T_PolyObjFade;
|
th->thinker.function.acp1 = (actionf_p1)T_PolyObjFade;
|
||||||
|
|
Loading…
Reference in a new issue