mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 19:02:34 +00:00
Maybe let's not handle FF_TRANSLUCENT for fade FOF.
Why: FF_TRANSLUCENT is often packaged with flags FF_EXTRA, FF_CUTEXTRA; for intangibles, FF_CUTSPIRTES; in some cases (?), FF_CUTLEVEL. I *think* the rules are consistent amongst predefined FOFs, but maybe there are exceptions? There's too much that can go wrong with assuming too many flags for an FOF. Just make it the modder's responsibility to tag this special to the proper translucent FOF.
This commit is contained in:
parent
d449aae76d
commit
73c7df6f5b
1 changed files with 2 additions and 29 deletions
31
src/p_spec.c
31
src/p_spec.c
|
@ -102,7 +102,7 @@ static void P_SpawnFriction(void);
|
|||
static void P_SpawnPushers(void);
|
||||
static void Add_Pusher(pushertype_e type, fixed_t x_mag, fixed_t y_mag, mobj_t *source, INT32 affectee, INT32 referrer, INT32 exclusive, INT32 slider); //SoM: 3/9/2000
|
||||
static void Add_MasterDisappearer(tic_t appeartime, tic_t disappeartime, tic_t offset, INT32 line, INT32 sourceline);
|
||||
static void P_AddMasterFader(INT32 destvalue, INT32 speed, BOOL handleexist, BOOL handlesolid, BOOL handletrans, INT32 line);
|
||||
static void P_AddMasterFader(INT32 destvalue, INT32 speed, BOOL handleexist, BOOL handlesolid, INT32 line);
|
||||
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);
|
||||
|
@ -3104,7 +3104,6 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
sides[line->sidenum[0]].rowoffset>>FRACBITS,
|
||||
(line->flags & ML_BLOCKMONSTERS), // handle FF_EXISTS
|
||||
(line->flags & ML_NOCLIMB), // handle FF_SOLID
|
||||
!(line->flags & ML_EFFECT1), // do not handle FF_TRANSLUCENT
|
||||
(INT32)(sectors[s].lines[j]-lines));
|
||||
break;
|
||||
}
|
||||
|
@ -7082,10 +7081,9 @@ void T_Disappear(disappear_t *d)
|
|||
* \param speed speed to fade by
|
||||
* \param handleexist handle FF_EXISTS
|
||||
* \param handlesolid handle FF_SOLID
|
||||
* \param handletrans do not handle FF_TRANSLUCENT
|
||||
* \param line line to target FOF
|
||||
*/
|
||||
static void P_AddMasterFader(INT32 destvalue, INT32 speed, BOOL handleexist, BOOL handlesolid, BOOL handletrans, INT32 line)
|
||||
static void P_AddMasterFader(INT32 destvalue, INT32 speed, BOOL handleexist, BOOL handlesolid, INT32 line)
|
||||
{
|
||||
fade_t *d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
|
||||
|
||||
|
@ -7105,9 +7103,6 @@ static void P_AddMasterFader(INT32 destvalue, INT32 speed, BOOL handleexist, BOO
|
|||
if (handlesolid)
|
||||
d->handleflags |= FF_SOLID;
|
||||
|
||||
if (handletrans)
|
||||
d->handleflags |= FF_TRANSLUCENT;
|
||||
|
||||
P_AddThinker(&d->thinker);
|
||||
|
||||
//CONS_Printf("Added fader | Dest %i | Speed %i | Ignore %i\n", d->destvalue, d->speed, d->handleflags);
|
||||
|
@ -7155,14 +7150,6 @@ void T_Fade(fade_t *d)
|
|||
&& !(rover->flags & FF_SWIMMABLE)
|
||||
&& !(rover->flags & FF_QUICKSAND))
|
||||
rover->flags &= ~FF_SOLID; // make intangible at end of fade-out
|
||||
|
||||
if (d->handleflags & FF_TRANSLUCENT)
|
||||
{
|
||||
if (rover->alpha >= 256)
|
||||
rover->flags &= ~FF_TRANSLUCENT;
|
||||
else
|
||||
rover->flags |= FF_TRANSLUCENT;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -7178,9 +7165,6 @@ void T_Fade(fade_t *d)
|
|||
&& !(rover->flags & FF_QUICKSAND))
|
||||
rover->flags |= FF_SOLID; // keep solid during fade
|
||||
|
||||
if (d->handleflags & FF_TRANSLUCENT)
|
||||
rover->flags |= FF_TRANSLUCENT; // assume we're not completely opaque
|
||||
|
||||
affectedffloors++;
|
||||
}
|
||||
}
|
||||
|
@ -7206,14 +7190,6 @@ void T_Fade(fade_t *d)
|
|||
&& !(rover->flags & FF_SWIMMABLE)
|
||||
&& !(rover->flags & FF_QUICKSAND))
|
||||
rover->flags |= FF_SOLID; // make solid at end of fade-in
|
||||
|
||||
if (d->handleflags & FF_TRANSLUCENT)
|
||||
{
|
||||
if (rover->alpha >= 256)
|
||||
rover->flags &= ~FF_TRANSLUCENT;
|
||||
else
|
||||
rover->flags |= FF_TRANSLUCENT;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -7229,9 +7205,6 @@ void T_Fade(fade_t *d)
|
|||
&& !(rover->flags & FF_QUICKSAND))
|
||||
rover->flags |= FF_SOLID; // keep solid during fade
|
||||
|
||||
if (d->handleflags & FF_TRANSLUCENT)
|
||||
rover->flags |= FF_TRANSLUCENT; // assume we're not completely opaque
|
||||
|
||||
affectedffloors++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue