Add dolighting flag to FadeFakeFloor thinker

This commit is contained in:
mazmazz 2018-09-08 20:41:45 -04:00
parent 3eb7c3931e
commit 069cc480c1
3 changed files with 12 additions and 5 deletions

View file

@ -1592,6 +1592,7 @@ static void SaveFadeThinker(const thinker_t *th, const UINT8 type)
WRITEUINT8(save_p, ht->doexists);
WRITEUINT8(save_p, ht->dotranslucent);
WRITEUINT8(save_p, ht->docollision);
WRITEUINT8(save_p, ht->dolighting);
WRITEUINT8(save_p, ht->doghostfade);
WRITEUINT8(save_p, ht->exactalpha);
}
@ -2596,6 +2597,7 @@ static inline void LoadFadeThinker(actionf_p1 thinker)
ht->doexists = READUINT8(save_p);
ht->dotranslucent = READUINT8(save_p);
ht->docollision = READUINT8(save_p);
ht->dolighting = READUINT8(save_p);
ht->doghostfade = READUINT8(save_p);
ht->exactalpha = READUINT8(save_p);

View file

@ -106,10 +106,10 @@ static void Add_MasterDisappearer(tic_t appeartime, tic_t disappeartime, tic_t o
static void P_ResetFakeFloorFader(ffloor_t *rover, fade_t *data, boolean finalize);
#define P_RemoveFakeFloorFader(l) P_ResetFakeFloorFader(l, NULL, false);
static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 destvalue, INT16 speed,
boolean doexists, boolean dotranslucent, boolean docollision, boolean doghostfade, boolean exactalpha);
boolean doexists, boolean dotranslucent, boolean docollision, boolean dolighting, boolean doghostfade, boolean exactalpha);
static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloornum,
INT16 destvalue, INT16 speed,
boolean doexists, boolean dotranslucent, boolean docollision, boolean doghostfade, boolean exactalpha);
boolean doexists, boolean dotranslucent, boolean docollision, boolean dolighting, boolean doghostfade, boolean exactalpha);
static void P_AddBlockThinker(sector_t *sec, line_t *sourceline);
static void P_AddFloatThinker(sector_t *sec, INT32 tag, line_t *sourceline);
//static void P_AddBridgeThinker(line_t *sourceline, sector_t *sec);
@ -3356,6 +3356,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
!(line->flags & ML_BLOCKMONSTERS), // do not handle FF_EXISTS
!(line->flags & ML_NOCLIMB), // do not handle FF_TRANSLUCENT
!(line->flags & ML_BOUNCY), // do not handle interactive flags
!(line->flags & ML_EFFECT2), // do not handle lighting
(line->flags & ML_EFFECT1), // do ghost fade (no interactive flags during fade)
(line->flags & ML_TFERLINE)); // use exact alpha values (for opengl)
else
@ -3366,6 +3367,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
!(line->flags & ML_BLOCKMONSTERS), // do not handle FF_EXISTS
!(line->flags & ML_NOCLIMB), // do not handle FF_TRANSLUCENT
!(line->flags & ML_BOUNCY), // do not handle interactive flags
!(line->flags & ML_EFFECT2), // do not handle lighting
(line->flags & ML_EFFECT1), // do ghost fade (no interactive flags during fade)
(line->flags & ML_TFERLINE)); // use exact alpha values (for opengl)
}
@ -7442,6 +7444,7 @@ static void P_ResetFakeFloorFader(ffloor_t *rover, fade_t *data, boolean finaliz
fadingdata->doexists,
fadingdata->dotranslucent,
fadingdata->docollision,
fadingdata->dolighting,
fadingdata->doghostfade,
fadingdata->exactalpha);
rover->alpha = fadingdata->alpha;
@ -7454,7 +7457,7 @@ static void P_ResetFakeFloorFader(ffloor_t *rover, fade_t *data, boolean finaliz
}
static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 destvalue, INT16 speed,
boolean doexists, boolean dotranslucent, boolean docollision, boolean doghostfade, boolean exactalpha)
boolean doexists, boolean dotranslucent, boolean docollision, boolean dolighting, boolean doghostfade, boolean exactalpha)
{
boolean stillfading = false;
INT32 alpha;
@ -7681,7 +7684,7 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 destvalue, INT16 speed,
*/
static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloornum,
INT16 destvalue, INT16 speed,
boolean doexists, boolean dotranslucent, boolean docollision, boolean doghostfade, boolean exactalpha)
boolean doexists, boolean dotranslucent, boolean dolighting, boolean docollision, boolean doghostfade, boolean exactalpha)
{
fade_t *d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
@ -7705,6 +7708,7 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor
d->doexists = doexists;
d->dotranslucent = dotranslucent;
d->docollision = docollision;
d->dolighting = dolighting;
d->doghostfade = doghostfade;
d->exactalpha = exactalpha;
@ -7721,7 +7725,7 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor
*/
void T_Fade(fade_t *d)
{
if (d->rover && !P_FadeFakeFloor(d->rover, d->destvalue, d->speed, d->doexists, d->dotranslucent, d->docollision, d->doghostfade, d->exactalpha))
if (d->rover && !P_FadeFakeFloor(d->rover, d->destvalue, d->speed, d->doexists, d->dotranslucent, d->docollision, d->dolighting, d->doghostfade, d->exactalpha))
P_RemoveFakeFloorFader(d->rover);
}

View file

@ -466,6 +466,7 @@ typedef struct
boolean doexists; ///< Handle FF_EXISTS
boolean dotranslucent; ///< Handle FF_TRANSLUCENT
boolean docollision; ///< Handle interactive flags
boolean dolighting; ///< Handle shadows and light blocks
boolean doghostfade; ///< No interactive flags during fading
boolean exactalpha; ///< Use exact alpha values (opengl)
} fade_t;