Rename dofadeinonly to doghostfade
* Ghost fading: when transitioning to/from alpha=0, don't set solid/tangibility until fade is finished
This commit is contained in:
parent
841c31a6ba
commit
931297e2d7
|
@ -1573,7 +1573,7 @@ static void SaveFadeThinker(const thinker_t *th, const UINT8 type)
|
||||||
WRITEUINT8(save_p, ht->dotranslucent);
|
WRITEUINT8(save_p, ht->dotranslucent);
|
||||||
WRITEUINT8(save_p, ht->dosolid);
|
WRITEUINT8(save_p, ht->dosolid);
|
||||||
WRITEUINT8(save_p, ht->dospawnflags);
|
WRITEUINT8(save_p, ht->dospawnflags);
|
||||||
WRITEUINT8(save_p, ht->dofadeinonly);
|
WRITEUINT8(save_p, ht->doghostfade);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -2575,7 +2575,7 @@ static inline void LoadFadeThinker(actionf_p1 thinker)
|
||||||
ht->dotranslucent = READUINT8(save_p);
|
ht->dotranslucent = READUINT8(save_p);
|
||||||
ht->dosolid = READUINT8(save_p);
|
ht->dosolid = READUINT8(save_p);
|
||||||
ht->dospawnflags = READUINT8(save_p);
|
ht->dospawnflags = READUINT8(save_p);
|
||||||
ht->dofadeinonly = READUINT8(save_p);
|
ht->doghostfade = READUINT8(save_p);
|
||||||
|
|
||||||
line_t *ffloorline = LoadLine(ht->affectee);
|
line_t *ffloorline = LoadLine(ht->affectee);
|
||||||
if (ffloorline && ffloorline->frontsector)
|
if (ffloorline && ffloorline->frontsector)
|
||||||
|
|
18
src/p_spec.c
18
src/p_spec.c
|
@ -107,10 +107,10 @@ static void P_ResetFading(line_t *line, fade_t *data);
|
||||||
#define P_RemoveFading(l) P_ResetFading(l, NULL);
|
#define P_RemoveFading(l) P_ResetFading(l, NULL);
|
||||||
static INT32 P_FindFakeFloorsDoAlpha(INT16 destvalue, INT16 speed,
|
static INT32 P_FindFakeFloorsDoAlpha(INT16 destvalue, INT16 speed,
|
||||||
boolean doexists, boolean dotranslucent, boolean dosolid, boolean dospawnflags,
|
boolean doexists, boolean dotranslucent, boolean dosolid, boolean dospawnflags,
|
||||||
boolean dofadeinonly, INT32 line);
|
boolean doghostfade, INT32 line);
|
||||||
static void P_AddMasterFader(INT16 destvalue, INT16 speed,
|
static void P_AddMasterFader(INT16 destvalue, INT16 speed,
|
||||||
boolean doexists, boolean dotranslucent, boolean dosolid, boolean dospawnflags,
|
boolean doexists, boolean dotranslucent, boolean dosolid, boolean dospawnflags,
|
||||||
boolean dofadeinonly, INT32 line);
|
boolean doghostfade, INT32 line);
|
||||||
static void P_AddBlockThinker(sector_t *sec, line_t *sourceline);
|
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_AddFloatThinker(sector_t *sec, INT32 tag, line_t *sourceline);
|
||||||
//static void P_AddBridgeThinker(line_t *sourceline, sector_t *sec);
|
//static void P_AddBridgeThinker(line_t *sourceline, sector_t *sec);
|
||||||
|
@ -7175,7 +7175,7 @@ static void P_ResetFading(line_t *line, fade_t *data)
|
||||||
|
|
||||||
static boolean P_DoFakeFloorAlpha(ffloor_t *rover, INT16 destvalue, INT16 speed,
|
static boolean P_DoFakeFloorAlpha(ffloor_t *rover, INT16 destvalue, INT16 speed,
|
||||||
boolean doexists, boolean dotranslucent, boolean dosolid, boolean dospawnflags,
|
boolean doexists, boolean dotranslucent, boolean dosolid, boolean dospawnflags,
|
||||||
boolean dofadeinonly)
|
boolean doghostfade)
|
||||||
{
|
{
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
|
|
||||||
|
@ -7318,7 +7318,7 @@ static boolean P_DoFakeFloorAlpha(ffloor_t *rover, INT16 destvalue, INT16 speed,
|
||||||
|
|
||||||
static INT32 P_FindFakeFloorsDoAlpha(INT16 destvalue, INT16 speed,
|
static INT32 P_FindFakeFloorsDoAlpha(INT16 destvalue, INT16 speed,
|
||||||
boolean doexists, boolean dotranslucent, boolean dosolid, boolean dospawnflags,
|
boolean doexists, boolean dotranslucent, boolean dosolid, boolean dospawnflags,
|
||||||
boolean dofadeinonly, INT32 line)
|
boolean doghostfade, INT32 line)
|
||||||
{
|
{
|
||||||
ffloor_t *rover;
|
ffloor_t *rover;
|
||||||
register INT32 s;
|
register INT32 s;
|
||||||
|
@ -7331,7 +7331,7 @@ static INT32 P_FindFakeFloorsDoAlpha(INT16 destvalue, INT16 speed,
|
||||||
if (rover->master != &lines[line])
|
if (rover->master != &lines[line])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
affectedffloors += (INT32)P_DoFakeFloorAlpha(rover, destvalue, speed, doexists, dotranslucent, dosolid, dospawnflags, dofadeinonly);
|
affectedffloors += (INT32)P_DoFakeFloorAlpha(rover, destvalue, speed, doexists, dotranslucent, dosolid, dospawnflags, doghostfade);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7346,12 +7346,12 @@ static INT32 P_FindFakeFloorsDoAlpha(INT16 destvalue, INT16 speed,
|
||||||
* \param dotranslucent handle FF_TRANSLUCENT
|
* \param dotranslucent handle FF_TRANSLUCENT
|
||||||
* \param dosolid handle FF_SOLID
|
* \param dosolid handle FF_SOLID
|
||||||
* \param dospawnflags handle spawnflags
|
* \param dospawnflags handle spawnflags
|
||||||
* \param dofadeinonly enable flags when fade-in is finished; never on fade-out
|
* \param doghostfade enable flags when fade-in is finished; never on fade-out
|
||||||
* \param line line to target FOF
|
* \param line line to target FOF
|
||||||
*/
|
*/
|
||||||
static void P_AddMasterFader(INT16 destvalue, INT16 speed,
|
static void P_AddMasterFader(INT16 destvalue, INT16 speed,
|
||||||
boolean doexists, boolean dotranslucent, boolean dosolid, boolean dospawnflags,
|
boolean doexists, boolean dotranslucent, boolean dosolid, boolean dospawnflags,
|
||||||
boolean dofadeinonly, INT32 line)
|
boolean doghostfade, INT32 line)
|
||||||
{
|
{
|
||||||
fade_t *d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
|
fade_t *d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
|
||||||
|
|
||||||
|
@ -7363,7 +7363,7 @@ static void P_AddMasterFader(INT16 destvalue, INT16 speed,
|
||||||
d->dotranslucent = dotranslucent;
|
d->dotranslucent = dotranslucent;
|
||||||
d->dosolid = dosolid;
|
d->dosolid = dosolid;
|
||||||
d->dospawnflags = dospawnflags;
|
d->dospawnflags = dospawnflags;
|
||||||
d->dofadeinonly = dofadeinonly;
|
d->doghostfade = doghostfade;
|
||||||
|
|
||||||
// find any existing thinkers and remove them, then replace with new data
|
// find any existing thinkers and remove them, then replace with new data
|
||||||
P_ResetFading(&lines[d->affectee], d);
|
P_ResetFading(&lines[d->affectee], d);
|
||||||
|
@ -7380,7 +7380,7 @@ void T_Fade(fade_t *d)
|
||||||
{
|
{
|
||||||
INT32 affectedffloors = P_FindFakeFloorsDoAlpha(d->destvalue, d->speed,
|
INT32 affectedffloors = P_FindFakeFloorsDoAlpha(d->destvalue, d->speed,
|
||||||
d->doexists, d->dotranslucent, d->dosolid, d->dospawnflags,
|
d->doexists, d->dotranslucent, d->dosolid, d->dospawnflags,
|
||||||
d->dofadeinonly, d->affectee);
|
d->doghostfade, d->affectee);
|
||||||
|
|
||||||
// no more ffloors to fade? remove myself
|
// no more ffloors to fade? remove myself
|
||||||
if (affectedffloors == 0)
|
if (affectedffloors == 0)
|
||||||
|
|
|
@ -460,7 +460,7 @@ typedef struct
|
||||||
boolean dotranslucent; ///< Handle FF_TRANSLUCENT handling
|
boolean dotranslucent; ///< Handle FF_TRANSLUCENT handling
|
||||||
boolean dosolid; ///< Handle FF_SOLID handling
|
boolean dosolid; ///< Handle FF_SOLID handling
|
||||||
boolean dospawnflags; ///< Enable spawnflags handling
|
boolean dospawnflags; ///< Enable spawnflags handling
|
||||||
boolean dofadeinonly; ///< Set flags only when fade-in is finished; never during fade-out
|
boolean doghostfade; ///< Set flags only when fade-in is finished; never during fade-out
|
||||||
} fade_t;
|
} fade_t;
|
||||||
|
|
||||||
void T_Fade(fade_t *d);
|
void T_Fade(fade_t *d);
|
||||||
|
|
Loading…
Reference in New Issue