From 8f149075a6a16006996a8982abb9e77f3244a23a Mon Sep 17 00:00:00 2001 From: mazmazz Date: Fri, 30 Mar 2018 22:56:43 -0400 Subject: [PATCH] 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. --- src/p_spec.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index 6b9b9499f..249d50f7d 100644 --- a/src/p_spec.c +++ b/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++; } }