Add fadingdata to sector_t

This commit is contained in:
mazmazz 2018-03-31 00:40:41 -04:00
parent c1c6b4746f
commit 3e8d264a2d
3 changed files with 8 additions and 1 deletions

View file

@ -2564,6 +2564,11 @@ static inline void LoadFadeThinker(actionf_p1 thinker)
ht->destvalue = READINT32(save_p);
ht->speed = READINT32(save_p);
ht->handleflags = READUINT32(save_p);
sector_t *ffloorsector = LoadSector(ht->affectee);
if (ffloorsector)
ffloorsector->fadingdata = ht;
P_AddThinker(&ht->thinker);
}
@ -2753,7 +2758,7 @@ static void P_NetUnArchiveThinkers(void)
// clear sector thinker pointers so they don't point to non-existant thinkers for all of eternity
for (i = 0; i < numsectors; i++)
{
sectors[i].floordata = sectors[i].ceilingdata = sectors[i].lightingdata = NULL;
sectors[i].floordata = sectors[i].ceilingdata = sectors[i].lightingdata = sectors[i].fadingdata = NULL;
}
// read in saved thinkers

View file

@ -693,6 +693,7 @@ static void P_LoadRawSectors(UINT8 *data, size_t i)
ss->floordata = NULL;
ss->ceilingdata = NULL;
ss->lightingdata = NULL;
ss->fadingdata = NULL;
ss->linecount = 0;
ss->lines = NULL;

View file

@ -308,6 +308,7 @@ typedef struct sector_s
void *floordata; // floor move thinker
void *ceilingdata; // ceiling move thinker
void *lightingdata; // lighting change thinker
void *fadingdata; // fading FOF thinker
// floor and ceiling texture offsets
fixed_t floor_xoffs, floor_yoffs;