mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Add Lua backwards compatibility for FOF flags
This commit is contained in:
parent
fc4b79c0de
commit
8d4baace53
20 changed files with 828 additions and 618 deletions
112
src/deh_tables.c
112
src/deh_tables.c
|
@ -5326,42 +5326,82 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"SKSJUMP",SKSJUMP},
|
||||
|
||||
// 3D Floor/Fake Floor/FOF/whatever flags
|
||||
{"FF_EXISTS",FF_EXISTS}, ///< Always set, to check for validity.
|
||||
{"FF_BLOCKPLAYER",FF_BLOCKPLAYER}, ///< Solid to player, but nothing else
|
||||
{"FF_BLOCKOTHERS",FF_BLOCKOTHERS}, ///< Solid to everything but player
|
||||
{"FF_SOLID",FF_SOLID}, ///< Clips things.
|
||||
{"FF_RENDERSIDES",FF_RENDERSIDES}, ///< Renders the sides.
|
||||
{"FF_RENDERPLANES",FF_RENDERPLANES}, ///< Renders the floor/ceiling.
|
||||
{"FF_RENDERALL",FF_RENDERALL}, ///< Renders everything.
|
||||
{"FF_SWIMMABLE",FF_SWIMMABLE}, ///< Is a water block.
|
||||
{"FF_NOSHADE",FF_NOSHADE}, ///< Messes with the lighting?
|
||||
{"FF_CUTSOLIDS",FF_CUTSOLIDS}, ///< Cuts out hidden solid pixels.
|
||||
{"FF_CUTEXTRA",FF_CUTEXTRA}, ///< Cuts out hidden translucent pixels.
|
||||
{"FF_CUTLEVEL",FF_CUTLEVEL}, ///< Cuts out all hidden pixels.
|
||||
{"FF_CUTSPRITES",FF_CUTSPRITES}, ///< Final step in making 3D water.
|
||||
{"FF_BOTHPLANES",FF_BOTHPLANES}, ///< Render inside and outside planes.
|
||||
{"FF_EXTRA",FF_EXTRA}, ///< Gets cut by ::FF_CUTEXTRA.
|
||||
{"FF_TRANSLUCENT",FF_TRANSLUCENT}, ///< See through!
|
||||
{"FF_FOG",FF_FOG}, ///< Fog "brush."
|
||||
{"FF_INVERTPLANES",FF_INVERTPLANES}, ///< Only render inside planes.
|
||||
{"FF_ALLSIDES",FF_ALLSIDES}, ///< Render inside and outside sides.
|
||||
{"FF_INVERTSIDES",FF_INVERTSIDES}, ///< Only render inside sides.
|
||||
{"FF_DOUBLESHADOW",FF_DOUBLESHADOW}, ///< Make two lightlist entries to reset light?
|
||||
{"FF_FLOATBOB",FF_FLOATBOB}, ///< Floats on water and bobs if you step on it.
|
||||
{"FF_NORETURN",FF_NORETURN}, ///< Used with ::FF_CRUMBLE. Will not return to its original position after falling.
|
||||
{"FF_CRUMBLE",FF_CRUMBLE}, ///< Falls 2 seconds after being stepped on, and randomly brings all touching crumbling 3dfloors down with it, providing their master sectors share the same tag (allows crumble platforms above or below, to also exist).
|
||||
{"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
|
||||
{"FF_MARIO",FF_MARIO}, ///< Acts like a question block when hit from underneath. Goodie spawned at top is determined by master sector.
|
||||
{"FF_BUSTUP",FF_BUSTUP}, ///< You can spin through/punch this block and it will crumble!
|
||||
{"FF_QUICKSAND",FF_QUICKSAND}, ///< Quicksand!
|
||||
{"FF_PLATFORM",FF_PLATFORM}, ///< You can jump up through this to the top.
|
||||
{"FF_REVERSEPLATFORM",FF_REVERSEPLATFORM}, ///< A fall-through floor in normal gravity, a platform in reverse gravity.
|
||||
{"FF_INTANGIBLEFLATS",FF_INTANGIBLEFLATS}, ///< Both flats are intangible, but the sides are still solid.
|
||||
{"FF_INTANGABLEFLATS",FF_INTANGIBLEFLATS}, ///< Both flats are intangable, but the sides are still solid.
|
||||
{"FF_RIPPLE",FF_RIPPLE}, ///< Ripple the flats
|
||||
{"FF_COLORMAPONLY",FF_COLORMAPONLY}, ///< Only copy the colormap, not the lightlevel
|
||||
{"FF_BOUNCY",FF_BOUNCY}, ///< Bounces players
|
||||
{"FF_SPLAT",FF_SPLAT}, ///< Use splat flat renderer (treat cyan pixels as invisible)
|
||||
{"FOF_EXISTS",FOF_EXISTS}, ///< Always set, to check for validity.
|
||||
{"FOF_BLOCKPLAYER",FOF_BLOCKPLAYER}, ///< Solid to player, but nothing else
|
||||
{"FOF_BLOCKOTHERS",FOF_BLOCKOTHERS}, ///< Solid to everything but player
|
||||
{"FOF_SOLID",FOF_SOLID}, ///< Clips things.
|
||||
{"FOF_RENDERSIDES",FOF_RENDERSIDES}, ///< Renders the sides.
|
||||
{"FOF_RENDERPLANES",FOF_RENDERPLANES}, ///< Renders the floor/ceiling.
|
||||
{"FOF_RENDERALL",FOF_RENDERALL}, ///< Renders everything.
|
||||
{"FOF_SWIMMABLE",FOF_SWIMMABLE}, ///< Is a water block.
|
||||
{"FOF_NOSHADE",FOF_NOSHADE}, ///< Messes with the lighting?
|
||||
{"FOF_CUTSOLIDS",FOF_CUTSOLIDS}, ///< Cuts out hidden solid pixels.
|
||||
{"FOF_CUTEXTRA",FOF_CUTEXTRA}, ///< Cuts out hidden translucent pixels.
|
||||
{"FOF_CUTLEVEL",FOF_CUTLEVEL}, ///< Cuts out all hidden pixels.
|
||||
{"FOF_CUTSPRITES",FOF_CUTSPRITES}, ///< Final step in making 3D water.
|
||||
{"FOF_BOTHPLANES",FOF_BOTHPLANES}, ///< Render inside and outside planes.
|
||||
{"FOF_EXTRA",FOF_EXTRA}, ///< Gets cut by ::FOF_CUTEXTRA.
|
||||
{"FOF_TRANSLUCENT",FOF_TRANSLUCENT}, ///< See through!
|
||||
{"FOF_FOG",FOF_FOG}, ///< Fog "brush."
|
||||
{"FOF_INVERTPLANES",FOF_INVERTPLANES}, ///< Only render inside planes.
|
||||
{"FOF_ALLSIDES",FOF_ALLSIDES}, ///< Render inside and outside sides.
|
||||
{"FOF_INVERTSIDES",FOF_INVERTSIDES}, ///< Only render inside sides.
|
||||
{"FOF_DOUBLESHADOW",FOF_DOUBLESHADOW}, ///< Make two lightlist entries to reset light?
|
||||
{"FOF_FLOATBOB",FOF_FLOATBOB}, ///< Floats on water and bobs if you step on it.
|
||||
{"FOF_NORETURN",FOF_NORETURN}, ///< Used with ::FOF_CRUMBLE. Will not return to its original position after falling.
|
||||
{"FOF_CRUMBLE",FOF_CRUMBLE}, ///< Falls 2 seconds after being stepped on, and randomly brings all touching crumbling 3dfloors down with it, providing their master sectors share the same tag (allows crumble platforms above or below, to also exist).
|
||||
{"FOF_GOOWATER",FOF_GOOWATER}, ///< Used with ::FOF_SWIMMABLE. Makes thick bouncey goop.
|
||||
{"FOF_MARIO",FOF_MARIO}, ///< Acts like a question block when hit from underneath. Goodie spawned at top is determined by master sector.
|
||||
{"FOF_BUSTUP",FOF_BUSTUP}, ///< You can spin through/punch this block and it will crumble!
|
||||
{"FOF_QUICKSAND",FOF_QUICKSAND}, ///< Quicksand!
|
||||
{"FOF_PLATFORM",FOF_PLATFORM}, ///< You can jump up through this to the top.
|
||||
{"FOF_REVERSEPLATFORM",FOF_REVERSEPLATFORM}, ///< A fall-through floor in normal gravity, a platform in reverse gravity.
|
||||
{"FOF_INTANGIBLEFLATS",FOF_INTANGIBLEFLATS}, ///< Both flats are intangible, but the sides are still solid.
|
||||
{"FF_INTANGABLEFLATS",FOF_INTANGIBLEFLATS}, ///< Both flats are intangable, but the sides are still solid. //TODO
|
||||
{"FOF_RIPPLE",FOF_RIPPLE}, ///< Ripple the flats
|
||||
{"FOF_COLORMAPONLY",FOF_COLORMAPONLY}, ///< Only copy the colormap, not the lightlevel
|
||||
{"FOF_BOUNCY",FOF_BOUNCY}, ///< Bounces players
|
||||
{"FOF_SPLAT",FOF_SPLAT}, ///< Use splat flat renderer (treat cyan pixels as invisible)
|
||||
|
||||
// Old FOF flags for backwards compatibility
|
||||
{"FF_EXISTS",FF_OLD_EXISTS},
|
||||
{"FF_BLOCKPLAYER",FF_OLD_BLOCKPLAYER},
|
||||
{"FF_BLOCKOTHERS",FF_OLD_BLOCKOTHERS},
|
||||
{"FF_SOLID",FF_OLD_SOLID},
|
||||
{"FF_RENDERSIDES",FF_OLD_RENDERSIDES},
|
||||
{"FF_RENDERPLANES",FF_OLD_RENDERPLANES},
|
||||
{"FF_RENDERALL",FF_OLD_RENDERALL},
|
||||
{"FF_SWIMMABLE",FF_OLD_SWIMMABLE},
|
||||
{"FF_NOSHADE",FF_OLD_NOSHADE},
|
||||
{"FF_CUTSOLIDS",FF_OLD_CUTSOLIDS},
|
||||
{"FF_CUTEXTRA",FF_OLD_CUTEXTRA},
|
||||
{"FF_CUTLEVEL",FF_OLD_CUTLEVEL},
|
||||
{"FF_CUTSPRITES",FF_OLD_CUTSPRITES},
|
||||
{"FF_BOTHPLANES",FF_OLD_BOTHPLANES},
|
||||
{"FF_EXTRA",FF_OLD_EXTRA},
|
||||
{"FF_TRANSLUCENT",FF_OLD_TRANSLUCENT},
|
||||
{"FF_FOG",FF_OLD_FOG},
|
||||
{"FF_INVERTPLANES",FF_OLD_INVERTPLANES},
|
||||
{"FF_ALLSIDES",FF_OLD_ALLSIDES},
|
||||
{"FF_INVERTSIDES",FF_OLD_INVERTSIDES},
|
||||
{"FF_DOUBLESHADOW",FF_OLD_DOUBLESHADOW},
|
||||
{"FF_FLOATBOB",FF_OLD_FLOATBOB},
|
||||
{"FF_NORETURN",FF_OLD_NORETURN},
|
||||
{"FF_CRUMBLE",FF_OLD_CRUMBLE},
|
||||
{"FF_SHATTERBOTTOM",FF_OLD_SHATTERBOTTOM},
|
||||
{"FF_GOOWATER",FF_OLD_GOOWATER},
|
||||
{"FF_MARIO",FF_OLD_MARIO},
|
||||
{"FF_BUSTUP",FF_OLD_BUSTUP},
|
||||
{"FF_QUICKSAND",FF_OLD_QUICKSAND},
|
||||
{"FF_PLATFORM",FF_OLD_PLATFORM},
|
||||
{"FF_REVERSEPLATFORM",FF_OLD_REVERSEPLATFORM},
|
||||
{"FF_INTANGIBLEFLATS",FF_OLD_INTANGIBLEFLATS},
|
||||
{"FF_INTANGABLEFLATS",FF_OLD_INTANGIBLEFLATS},
|
||||
{"FF_SHATTER",FF_OLD_SHATTER},
|
||||
{"FF_SPINBUST",FF_OLD_SPINBUST},
|
||||
{"FF_STRONGBUST",FF_OLD_STRONGBUST},
|
||||
{"FF_RIPPLE",FF_OLD_RIPPLE},
|
||||
{"FF_COLORMAPONLY",FF_OLD_COLORMAPONLY},
|
||||
|
||||
// FOF bustable flags
|
||||
{"FB_PUSHABLES",FB_PUSHABLES},
|
||||
|
|
|
@ -887,9 +887,9 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum,
|
|||
if (endtop < endrealbot && top < realbot)
|
||||
return;
|
||||
|
||||
if (!(list[i].flags & FF_NOSHADE))
|
||||
if (!(list[i].flags & FOF_NOSHADE))
|
||||
{
|
||||
if (pfloor && (pfloor->flags & FF_FOG))
|
||||
if (pfloor && (pfloor->fofflags & FOF_FOG))
|
||||
{
|
||||
lightnum = HWR_CalcWallLight(pfloor->master->frontsector->lightlevel, v1x, v1y, v2x, v2y);
|
||||
colormap = pfloor->master->frontsector->extra_colormap;
|
||||
|
@ -903,13 +903,13 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum,
|
|||
|
||||
solid = false;
|
||||
|
||||
if ((sector->lightlist[i].flags & FF_CUTSOLIDS) && !(cutflag & FF_EXTRA))
|
||||
if ((sector->lightlist[i].flags & FOF_CUTSOLIDS) && !(cutflag & FOF_EXTRA))
|
||||
solid = true;
|
||||
else if ((sector->lightlist[i].flags & FF_CUTEXTRA) && (cutflag & FF_EXTRA))
|
||||
else if ((sector->lightlist[i].flags & FOF_CUTEXTRA) && (cutflag & FOF_EXTRA))
|
||||
{
|
||||
if (sector->lightlist[i].flags & FF_EXTRA)
|
||||
if (sector->lightlist[i].flags & FOF_EXTRA)
|
||||
{
|
||||
if ((sector->lightlist[i].flags & (FF_FOG|FF_SWIMMABLE)) == (cutflag & (FF_FOG|FF_SWIMMABLE))) // Only merge with your own types
|
||||
if ((sector->lightlist[i].flags & (FOF_FOG|FOF_SWIMMABLE)) == (cutflag & (FOF_FOG|FOF_SWIMMABLE))) // Only merge with your own types
|
||||
solid = true;
|
||||
}
|
||||
else
|
||||
|
@ -978,7 +978,7 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum,
|
|||
wallVerts[0].y = bot;
|
||||
wallVerts[1].y = endbot;
|
||||
|
||||
if (cutflag & FF_FOG)
|
||||
if (cutflag & FOF_FOG)
|
||||
HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Fog|PF_NoTexture|polyflags, true, lightnum, colormap);
|
||||
else if (polyflags & (PF_Translucent|PF_Additive|PF_Subtractive|PF_ReverseSubtract|PF_Multiplicative|PF_Environment))
|
||||
HWR_AddTransparentWall(wallVerts, Surf, texnum, polyflags, false, lightnum, colormap);
|
||||
|
@ -1007,7 +1007,7 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum,
|
|||
wallVerts[0].y = bot;
|
||||
wallVerts[1].y = endbot;
|
||||
|
||||
if (cutflag & FF_FOG)
|
||||
if (cutflag & FOF_FOG)
|
||||
HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Fog|PF_NoTexture|polyflags, true, lightnum, colormap);
|
||||
else if (polyflags & (PF_Translucent|PF_Additive|PF_Subtractive|PF_ReverseSubtract|PF_Multiplicative|PF_Environment))
|
||||
HWR_AddTransparentWall(wallVerts, Surf, texnum, polyflags, false, lightnum, colormap);
|
||||
|
@ -1192,7 +1192,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
wallVerts[1].y = FIXED_TO_FLOAT(worldhighslope);
|
||||
|
||||
if (gl_frontsector->numlights)
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, gl_toptexture, &Surf, FF_CUTLEVEL, NULL, 0);
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, gl_toptexture, &Surf, FOF_CUTLEVEL, NULL, 0);
|
||||
else if (grTex->mipmap.flags & TF_TRANSPARENT)
|
||||
HWR_AddTransparentWall(wallVerts, &Surf, gl_toptexture, PF_Environment, false, lightnum, colormap);
|
||||
else
|
||||
|
@ -1258,7 +1258,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
wallVerts[1].y = FIXED_TO_FLOAT(worldbottomslope);
|
||||
|
||||
if (gl_frontsector->numlights)
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, gl_bottomtexture, &Surf, FF_CUTLEVEL, NULL, 0);
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, gl_bottomtexture, &Surf, FOF_CUTLEVEL, NULL, 0);
|
||||
else if (grTex->mipmap.flags & TF_TRANSPARENT)
|
||||
HWR_AddTransparentWall(wallVerts, &Surf, gl_bottomtexture, PF_Environment, false, lightnum, colormap);
|
||||
else
|
||||
|
@ -1465,9 +1465,9 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
if (gl_frontsector->numlights)
|
||||
{
|
||||
if (!(blendmode & PF_Masked))
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FF_TRANSLUCENT, NULL, blendmode);
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FOF_TRANSLUCENT, NULL, blendmode);
|
||||
else
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FF_CUTLEVEL, NULL, blendmode);
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FOF_CUTLEVEL, NULL, blendmode);
|
||||
}
|
||||
else if (!(blendmode & PF_Masked))
|
||||
HWR_AddTransparentWall(wallVerts, &Surf, gl_midtexture, blendmode, false, lightnum, colormap);
|
||||
|
@ -1549,7 +1549,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
|
||||
// I don't think that solid walls can use translucent linedef types...
|
||||
if (gl_frontsector->numlights)
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FF_CUTLEVEL, NULL, 0);
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FOF_CUTLEVEL, NULL, 0);
|
||||
else
|
||||
{
|
||||
if (grTex->mipmap.flags & TF_TRANSPARENT)
|
||||
|
@ -1613,9 +1613,9 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
|
||||
if (bothsides) continue;
|
||||
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERSIDES))
|
||||
continue;
|
||||
if (!(rover->flags & FF_ALLSIDES) && rover->flags & FF_INVERTSIDES)
|
||||
if (!(rover->fofflags & FOF_ALLSIDES) && rover->fofflags & FOF_INVERTSIDES)
|
||||
continue;
|
||||
|
||||
SLOPEPARAMS(*rover->t_slope, high1, highslope1, *rover->topheight)
|
||||
|
@ -1656,7 +1656,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
wallVerts[2].y = FIXED_TO_FLOAT(hS);
|
||||
wallVerts[0].y = FIXED_TO_FLOAT(l);
|
||||
wallVerts[1].y = FIXED_TO_FLOAT(lS);
|
||||
if (rover->flags & FF_FOG)
|
||||
if (rover->fofflags & FOF_FOG)
|
||||
{
|
||||
wallVerts[3].t = wallVerts[2].t = 0;
|
||||
wallVerts[0].t = wallVerts[1].t = 0;
|
||||
|
@ -1715,7 +1715,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX;
|
||||
wallVerts[2].s = wallVerts[1].s = cliphigh * grTex->scaleX;
|
||||
}
|
||||
if (rover->flags & FF_FOG)
|
||||
if (rover->fofflags & FOF_FOG)
|
||||
{
|
||||
FBITFIELD blendmode;
|
||||
|
||||
|
@ -1727,7 +1727,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(rover->master->frontsector->lightlevel, rover->master->frontsector->extra_colormap);
|
||||
|
||||
if (gl_frontsector->numlights)
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, 0, &Surf, rover->flags, rover, blendmode);
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, 0, &Surf, rover->fofflags, rover, blendmode);
|
||||
else
|
||||
HWR_AddTransparentWall(wallVerts, &Surf, 0, blendmode, true, lightnum, colormap);
|
||||
}
|
||||
|
@ -1735,14 +1735,14 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
{
|
||||
FBITFIELD blendmode = PF_Masked;
|
||||
|
||||
if ((rover->flags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend)
|
||||
if ((rover->fofflags & FOF_TRANSLUCENT && rover->alpha < 256) || rover->blend)
|
||||
{
|
||||
blendmode = rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent;
|
||||
Surf.PolyColor.s.alpha = (UINT8)rover->alpha-1 > 255 ? 255 : rover->alpha-1;
|
||||
}
|
||||
|
||||
if (gl_frontsector->numlights)
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, texnum, &Surf, rover->flags, rover, blendmode);
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, texnum, &Surf, rover->fofflags, rover, blendmode);
|
||||
else
|
||||
{
|
||||
if (blendmode != PF_Masked)
|
||||
|
@ -1770,9 +1770,9 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
|
||||
if (bothsides) continue;
|
||||
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERSIDES))
|
||||
continue;
|
||||
if (!(rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES))
|
||||
if (!(rover->fofflags & FOF_ALLSIDES || rover->fofflags & FOF_INVERTSIDES))
|
||||
continue;
|
||||
|
||||
SLOPEPARAMS(*rover->t_slope, high1, highslope1, *rover->topheight)
|
||||
|
@ -1812,7 +1812,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
wallVerts[2].y = FIXED_TO_FLOAT(hS);
|
||||
wallVerts[0].y = FIXED_TO_FLOAT(l);
|
||||
wallVerts[1].y = FIXED_TO_FLOAT(lS);
|
||||
if (rover->flags & FF_FOG)
|
||||
if (rover->fofflags & FOF_FOG)
|
||||
{
|
||||
wallVerts[3].t = wallVerts[2].t = 0;
|
||||
wallVerts[0].t = wallVerts[1].t = 0;
|
||||
|
@ -1838,7 +1838,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
wallVerts[2].s = wallVerts[1].s = cliphigh * grTex->scaleX;
|
||||
}
|
||||
|
||||
if (rover->flags & FF_FOG)
|
||||
if (rover->fofflags & FOF_FOG)
|
||||
{
|
||||
FBITFIELD blendmode;
|
||||
|
||||
|
@ -1850,7 +1850,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(rover->master->frontsector->lightlevel, rover->master->frontsector->extra_colormap);
|
||||
|
||||
if (gl_backsector->numlights)
|
||||
HWR_SplitWall(gl_backsector, wallVerts, 0, &Surf, rover->flags, rover, blendmode);
|
||||
HWR_SplitWall(gl_backsector, wallVerts, 0, &Surf, rover->fofflags, rover, blendmode);
|
||||
else
|
||||
HWR_AddTransparentWall(wallVerts, &Surf, 0, blendmode, true, lightnum, colormap);
|
||||
}
|
||||
|
@ -1858,14 +1858,14 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
{
|
||||
FBITFIELD blendmode = PF_Masked;
|
||||
|
||||
if ((rover->flags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend)
|
||||
if ((rover->fofflags & FOF_TRANSLUCENT && rover->alpha < 256) || rover->blend)
|
||||
{
|
||||
blendmode = rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent;
|
||||
Surf.PolyColor.s.alpha = (UINT8)rover->alpha-1 > 255 ? 255 : rover->alpha-1;
|
||||
}
|
||||
|
||||
if (gl_backsector->numlights)
|
||||
HWR_SplitWall(gl_backsector, wallVerts, texnum, &Surf, rover->flags, rover, blendmode);
|
||||
HWR_SplitWall(gl_backsector, wallVerts, texnum, &Surf, rover->fofflags, rover, blendmode);
|
||||
else
|
||||
{
|
||||
if (blendmode != PF_Masked)
|
||||
|
@ -2946,7 +2946,7 @@ static FBITFIELD HWR_RippleBlend(sector_t *sector, ffloor_t *rover, boolean ceil
|
|||
{
|
||||
(void)sector;
|
||||
(void)ceiling;
|
||||
return /*R_IsRipplePlane(sector, rover, ceiling)*/ (rover->flags & FF_RIPPLE) ? PF_Ripple : 0;
|
||||
return /*R_IsRipplePlane(sector, rover, ceiling)*/ (rover->fofflags & FOF_RIPPLE) ? PF_Ripple : 0;
|
||||
}
|
||||
|
||||
// -----------------+
|
||||
|
@ -3114,17 +3114,17 @@ static void HWR_Subsector(size_t num)
|
|||
cullHeight = P_GetFFloorBottomZAt(rover, viewx, viewy);
|
||||
centerHeight = P_GetFFloorBottomZAt(rover, gl_frontsector->soundorg.x, gl_frontsector->soundorg.y);
|
||||
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERPLANES))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES))
|
||||
continue;
|
||||
if (sub->validcount == validcount)
|
||||
continue;
|
||||
|
||||
if (centerHeight <= locCeilingHeight &&
|
||||
centerHeight >= locFloorHeight &&
|
||||
((dup_viewz < cullHeight && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||
(dup_viewz > cullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||
((dup_viewz < cullHeight && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) ||
|
||||
(dup_viewz > cullHeight && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES))))
|
||||
{
|
||||
if (rover->flags & FF_FOG)
|
||||
if (rover->fofflags & FOF_FOG)
|
||||
{
|
||||
UINT8 alpha;
|
||||
|
||||
|
@ -3139,7 +3139,7 @@ static void HWR_Subsector(size_t num)
|
|||
alpha, rover->master->frontsector, PF_Fog|PF_NoTexture,
|
||||
true, rover->master->frontsector->extra_colormap);
|
||||
}
|
||||
else if ((rover->flags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend) // SoM: Flags are more efficient
|
||||
else if ((rover->fofflags & FOF_TRANSLUCENT && rover->alpha < 256) || rover->blend) // SoM: Flags are more efficient
|
||||
{
|
||||
light = R_GetPlaneLight(gl_frontsector, centerHeight, dup_viewz < cullHeight ? true : false);
|
||||
|
||||
|
@ -3167,10 +3167,10 @@ static void HWR_Subsector(size_t num)
|
|||
|
||||
if (centerHeight >= locFloorHeight &&
|
||||
centerHeight <= locCeilingHeight &&
|
||||
((dup_viewz > cullHeight && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||
(dup_viewz < cullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||
((dup_viewz > cullHeight && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) ||
|
||||
(dup_viewz < cullHeight && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES))))
|
||||
{
|
||||
if (rover->flags & FF_FOG)
|
||||
if (rover->fofflags & FOF_FOG)
|
||||
{
|
||||
UINT8 alpha;
|
||||
|
||||
|
@ -3185,7 +3185,7 @@ static void HWR_Subsector(size_t num)
|
|||
alpha, rover->master->frontsector, PF_Fog|PF_NoTexture,
|
||||
true, rover->master->frontsector->extra_colormap);
|
||||
}
|
||||
else if ((rover->flags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend)
|
||||
else if ((rover->fofflags & FOF_TRANSLUCENT && rover->alpha < 256) || rover->blend)
|
||||
{
|
||||
light = R_GetPlaneLight(gl_frontsector, centerHeight, dup_viewz < cullHeight ? true : false);
|
||||
|
||||
|
@ -3939,7 +3939,7 @@ static void HWR_SplitSprite(gl_vissprite_t *spr)
|
|||
return;
|
||||
|
||||
// even if we aren't changing colormap or lightlevel, we still need to continue drawing down the sprite
|
||||
if (!(list[i].flags & FF_NOSHADE) && (list[i].flags & FF_CUTSPRITES))
|
||||
if (!(list[i].flags & FOF_NOSHADE) && (list[i].flags & FOF_CUTSPRITES))
|
||||
{
|
||||
if (!lightset)
|
||||
lightlevel = *list[i].lightlevel > 255 ? 255 : *list[i].lightlevel;
|
||||
|
|
178
src/lua_maplib.c
178
src/lua_maplib.c
|
@ -214,6 +214,7 @@ enum ffloor_e {
|
|||
ffloor_tslope,
|
||||
ffloor_bslope,
|
||||
ffloor_sector,
|
||||
ffloor_fofflags,
|
||||
ffloor_flags,
|
||||
ffloor_master,
|
||||
ffloor_target,
|
||||
|
@ -1841,6 +1842,80 @@ static int lib_numnodes(lua_State *L)
|
|||
// ffloor_t //
|
||||
//////////////
|
||||
|
||||
static INT32 P_GetOldFOFFlags(ffloor_t *fflr)
|
||||
{
|
||||
INT32 result = 0;
|
||||
if (fflr->fofflags & FOF_EXISTS)
|
||||
result |= FF_OLD_EXISTS;
|
||||
if (fflr->fofflags & FOF_BLOCKPLAYER)
|
||||
result |= FF_OLD_BLOCKPLAYER;
|
||||
if (fflr->fofflags & FOF_BLOCKOTHERS)
|
||||
result |= FF_OLD_BLOCKOTHERS;
|
||||
if (fflr->fofflags & FOF_RENDERSIDES)
|
||||
result |= FF_OLD_RENDERSIDES;
|
||||
if (fflr->fofflags & FOF_RENDERPLANES)
|
||||
result |= FF_OLD_RENDERPLANES;
|
||||
if (fflr->fofflags & FOF_SWIMMABLE)
|
||||
result |= FF_OLD_SWIMMABLE;
|
||||
if (fflr->fofflags & FOF_NOSHADE)
|
||||
result |= FF_OLD_NOSHADE;
|
||||
if (fflr->fofflags & FOF_CUTSOLIDS)
|
||||
result |= FF_OLD_CUTSOLIDS;
|
||||
if (fflr->fofflags & FOF_CUTEXTRA)
|
||||
result |= FF_OLD_CUTEXTRA;
|
||||
if (fflr->fofflags & FOF_CUTSPRITES)
|
||||
result |= FF_OLD_CUTSPRITES;
|
||||
if (fflr->fofflags & FOF_BOTHPLANES)
|
||||
result |= FF_OLD_BOTHPLANES;
|
||||
if (fflr->fofflags & FOF_EXTRA)
|
||||
result |= FF_OLD_EXTRA;
|
||||
if (fflr->fofflags & FOF_TRANSLUCENT)
|
||||
result |= FF_OLD_TRANSLUCENT;
|
||||
if (fflr->fofflags & FOF_FOG)
|
||||
result |= FF_OLD_FOG;
|
||||
if (fflr->fofflags & FOF_INVERTPLANES)
|
||||
result |= FF_OLD_INVERTPLANES;
|
||||
if (fflr->fofflags & FOF_ALLSIDES)
|
||||
result |= FF_OLD_ALLSIDES;
|
||||
if (fflr->fofflags & FOF_INVERTSIDES)
|
||||
result |= FF_OLD_INVERTSIDES;
|
||||
if (fflr->fofflags & FOF_DOUBLESHADOW)
|
||||
result |= FF_OLD_DOUBLESHADOW;
|
||||
if (fflr->fofflags & FOF_FLOATBOB)
|
||||
result |= FF_OLD_FLOATBOB;
|
||||
if (fflr->fofflags & FOF_NORETURN)
|
||||
result |= FF_OLD_NORETURN;
|
||||
if (fflr->fofflags & FOF_CRUMBLE)
|
||||
result |= FF_OLD_CRUMBLE;
|
||||
if (fflr->bustflags & TMFB_ONLYBOTTOM)
|
||||
result |= FF_OLD_SHATTERBOTTOM;
|
||||
if (fflr->fofflags & FOF_GOOWATER)
|
||||
result |= FF_OLD_GOOWATER;
|
||||
if (fflr->fofflags & FOF_MARIO)
|
||||
result |= FF_OLD_MARIO;
|
||||
if (fflr->fofflags & FOF_BUSTUP)
|
||||
result |= FF_OLD_BUSTUP;
|
||||
if (fflr->fofflags & FOF_QUICKSAND)
|
||||
result |= FF_OLD_QUICKSAND;
|
||||
if (fflr->fofflags & FOF_PLATFORM)
|
||||
result |= FF_OLD_PLATFORM;
|
||||
if (fflr->fofflags & FOF_REVERSEPLATFORM)
|
||||
result |= FF_OLD_REVERSEPLATFORM;
|
||||
if (fflr->fofflags & FOF_INTANGIBLEFLATS)
|
||||
result |= FF_OLD_INTANGIBLEFLATS;
|
||||
if (fflr->busttype == BT_TOUCH)
|
||||
result |= FF_OLD_SHATTER;
|
||||
if (fflr->busttype == BT_SPINBUST)
|
||||
result |= FF_OLD_SPINBUST;
|
||||
if (fflr->busttype == BT_STRONG)
|
||||
result |= FF_OLD_STRONGBUST;
|
||||
if (fflr->fofflags & FF_OLD_RIPPLE)
|
||||
result |= FOF_RIPPLE;
|
||||
if (fflr->fofflags & FF_OLD_COLORMAPONLY)
|
||||
result |= FOF_COLORMAPONLY;
|
||||
return result;
|
||||
}
|
||||
|
||||
static int ffloor_get(lua_State *L)
|
||||
{
|
||||
ffloor_t *ffloor = *((ffloor_t **)luaL_checkudata(L, 1, META_FFLOOR));
|
||||
|
@ -1895,8 +1970,11 @@ static int ffloor_get(lua_State *L)
|
|||
case ffloor_sector:
|
||||
LUA_PushUserdata(L, §ors[ffloor->secnum], META_SECTOR);
|
||||
return 1;
|
||||
case ffloor_fofflags:
|
||||
lua_pushinteger(L, ffloor->fofflags);
|
||||
return 1;
|
||||
case ffloor_flags:
|
||||
lua_pushinteger(L, ffloor->flags);
|
||||
lua_pushinteger(L, P_GetOldFOFFlags(ffloor));
|
||||
return 1;
|
||||
case ffloor_master:
|
||||
LUA_PushUserdata(L, ffloor->master, META_LINE);
|
||||
|
@ -1938,6 +2016,88 @@ static int ffloor_get(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void P_SetOldFOFFlags(ffloor_t *fflr, oldffloortype_e oldflags)
|
||||
{
|
||||
ffloortype_e originalflags = fflr->fofflags;
|
||||
fflr->fofflags = 0;
|
||||
if (oldflags & FF_OLD_EXISTS)
|
||||
fflr->fofflags |= FOF_EXISTS;
|
||||
if (oldflags & FF_OLD_BLOCKPLAYER)
|
||||
fflr->fofflags |= FOF_BLOCKPLAYER;
|
||||
if (oldflags & FF_OLD_BLOCKOTHERS)
|
||||
fflr->fofflags |= FOF_BLOCKOTHERS;
|
||||
if (oldflags & FF_OLD_RENDERSIDES)
|
||||
fflr->fofflags |= FOF_RENDERSIDES;
|
||||
if (oldflags & FF_OLD_RENDERPLANES)
|
||||
fflr->fofflags |= FOF_RENDERPLANES;
|
||||
if (oldflags & FF_OLD_SWIMMABLE)
|
||||
fflr->fofflags |= FOF_SWIMMABLE;
|
||||
if (oldflags & FF_OLD_NOSHADE)
|
||||
fflr->fofflags |= FOF_NOSHADE;
|
||||
if (oldflags & FF_OLD_CUTSOLIDS)
|
||||
fflr->fofflags |= FOF_CUTSOLIDS;
|
||||
if (oldflags & FF_OLD_CUTEXTRA)
|
||||
fflr->fofflags |= FOF_CUTEXTRA;
|
||||
if (oldflags & FF_OLD_CUTSPRITES)
|
||||
fflr->fofflags |= FOF_CUTSPRITES;
|
||||
if (oldflags & FF_OLD_BOTHPLANES)
|
||||
fflr->fofflags |= FOF_BOTHPLANES;
|
||||
if (oldflags & FF_OLD_EXTRA)
|
||||
fflr->fofflags |= FOF_EXTRA;
|
||||
if (oldflags & FF_OLD_TRANSLUCENT)
|
||||
fflr->fofflags |= FOF_TRANSLUCENT;
|
||||
if (oldflags & FF_OLD_FOG)
|
||||
fflr->fofflags |= FOF_FOG;
|
||||
if (oldflags & FF_OLD_INVERTPLANES)
|
||||
fflr->fofflags |= FOF_INVERTPLANES;
|
||||
if (oldflags & FF_OLD_ALLSIDES)
|
||||
fflr->fofflags |= FOF_ALLSIDES;
|
||||
if (oldflags & FF_OLD_INVERTSIDES)
|
||||
fflr->fofflags |= FOF_INVERTSIDES;
|
||||
if (oldflags & FF_OLD_DOUBLESHADOW)
|
||||
fflr->fofflags |= FOF_DOUBLESHADOW;
|
||||
if (oldflags & FF_OLD_FLOATBOB)
|
||||
fflr->fofflags |= FOF_FLOATBOB;
|
||||
if (oldflags & FF_OLD_NORETURN)
|
||||
fflr->fofflags |= FOF_NORETURN;
|
||||
if (oldflags & FF_OLD_CRUMBLE)
|
||||
fflr->fofflags |= FOF_CRUMBLE;
|
||||
if (oldflags & FF_OLD_GOOWATER)
|
||||
fflr->fofflags |= FOF_GOOWATER;
|
||||
if (oldflags & FF_OLD_MARIO)
|
||||
fflr->fofflags |= FOF_MARIO;
|
||||
if (oldflags & FF_OLD_BUSTUP)
|
||||
fflr->fofflags |= FOF_BUSTUP;
|
||||
if (oldflags & FF_OLD_QUICKSAND)
|
||||
fflr->fofflags |= FOF_QUICKSAND;
|
||||
if (oldflags & FF_OLD_PLATFORM)
|
||||
fflr->fofflags |= FOF_PLATFORM;
|
||||
if (oldflags & FF_OLD_REVERSEPLATFORM)
|
||||
fflr->fofflags |= FOF_REVERSEPLATFORM;
|
||||
if (oldflags & FF_OLD_RIPPLE)
|
||||
fflr->fofflags |= FOF_RIPPLE;
|
||||
if (oldflags & FF_OLD_COLORMAPONLY)
|
||||
fflr->fofflags |= FOF_COLORMAPONLY;
|
||||
if (originalflags & FOF_BOUNCY)
|
||||
fflr->fofflags |= FOF_BOUNCY;
|
||||
if (originalflags & FOF_SPLAT)
|
||||
fflr->fofflags |= FOF_SPLAT;
|
||||
|
||||
if (oldflags & FF_OLD_SHATTER)
|
||||
fflr->busttype = BT_TOUCH;
|
||||
else if (oldflags & FF_OLD_SPINBUST)
|
||||
fflr->busttype = BT_SPINBUST;
|
||||
else if (oldflags & FF_OLD_STRONGBUST)
|
||||
fflr->busttype = BT_STRONG;
|
||||
else
|
||||
fflr->busttype = BT_REGULAR;
|
||||
|
||||
if (oldflags & FF_OLD_SHATTERBOTTOM)
|
||||
fflr->bustflags |= TMFB_ONLYBOTTOM;
|
||||
else
|
||||
fflr->bustflags &= ~TMFB_ONLYBOTTOM;
|
||||
}
|
||||
|
||||
static int ffloor_set(lua_State *L)
|
||||
{
|
||||
ffloor_t *ffloor = *((ffloor_t **)luaL_checkudata(L, 1, META_FFLOOR));
|
||||
|
@ -2002,10 +2162,20 @@ static int ffloor_set(lua_State *L)
|
|||
case ffloor_bottompic:
|
||||
*ffloor->bottompic = P_AddLevelFlatRuntime(luaL_checkstring(L, 3));
|
||||
break;
|
||||
case ffloor_fofflags: {
|
||||
ffloortype_e oldflags = ffloor->fofflags; // store FOF's old flags
|
||||
ffloor->fofflags = luaL_checkinteger(L, 3);
|
||||
if (ffloor->fofflags != oldflags)
|
||||
ffloor->target->moved = true; // reset target sector's lightlist
|
||||
break;
|
||||
}
|
||||
case ffloor_flags: {
|
||||
ffloortype_e oldflags = ffloor->flags; // store FOF's old flags
|
||||
ffloor->flags = luaL_checkinteger(L, 3);
|
||||
if (ffloor->flags != oldflags)
|
||||
ffloortype_e oldflags = ffloor->fofflags; // store FOF's old flags
|
||||
busttype_e oldbusttype = ffloor->busttype;
|
||||
ffloorbustflags_e oldbustflags = ffloor->bustflags;
|
||||
oldffloortype_e newflags = luaL_checkinteger(L, 3);
|
||||
P_SetOldFOFFlags(ffloor, newflags);
|
||||
if (ffloor->fofflags != oldflags || ffloor->busttype != oldbusttype || ffloor->bustflags != oldbustflags)
|
||||
ffloor->target->moved = true; // reset target sector's lightlist
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -498,7 +498,7 @@ static boolean P_WaterInSector(mobj_t *mobj, fixed_t x, fixed_t y)
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE))
|
||||
continue;
|
||||
|
||||
if (*rover->topheight >= mobj->floorz && *rover->topheight <= mobj->z)
|
||||
|
|
|
@ -551,7 +551,7 @@ static fixed_t P_SectorCheckWater(sector_t *analyzesector,
|
|||
|
||||
for (rover = analyzesector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE) || rover->flags & FF_SOLID)
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE) || rover->fofflags & FOF_SOLID)
|
||||
continue;
|
||||
|
||||
// If the sector is below the water, don't bother.
|
||||
|
@ -757,10 +757,10 @@ void T_StartCrumble(crumble_t *crumble)
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_CRUMBLE))
|
||||
if (!(rover->fofflags & FOF_CRUMBLE))
|
||||
continue;
|
||||
|
||||
if (!(rover->flags & FF_FLOATBOB))
|
||||
if (!(rover->fofflags & FOF_FLOATBOB))
|
||||
continue;
|
||||
|
||||
if (rover->master != crumble->sourceline)
|
||||
|
@ -769,7 +769,7 @@ void T_StartCrumble(crumble_t *crumble)
|
|||
rover->alpha = crumble->origalpha;
|
||||
|
||||
if (rover->alpha == 0xff)
|
||||
rover->flags &= ~FF_TRANSLUCENT;
|
||||
rover->fofflags &= ~FOF_TRANSLUCENT;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -793,13 +793,13 @@ void T_StartCrumble(crumble_t *crumble)
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (rover->flags & FF_NORETURN)
|
||||
if (rover->fofflags & FOF_NORETURN)
|
||||
continue;
|
||||
|
||||
if (!(rover->flags & FF_CRUMBLE))
|
||||
if (!(rover->fofflags & FOF_CRUMBLE))
|
||||
continue;
|
||||
|
||||
if (!(rover->flags & FF_FLOATBOB))
|
||||
if (!(rover->fofflags & FOF_FLOATBOB))
|
||||
continue;
|
||||
|
||||
if (rover->master != crumble->sourceline)
|
||||
|
@ -807,7 +807,7 @@ void T_StartCrumble(crumble_t *crumble)
|
|||
|
||||
if (rover->alpha == crumble->origalpha)
|
||||
{
|
||||
rover->flags |= FF_TRANSLUCENT;
|
||||
rover->fofflags |= FOF_TRANSLUCENT;
|
||||
rover->alpha = 0x00;
|
||||
}
|
||||
else
|
||||
|
@ -815,7 +815,7 @@ void T_StartCrumble(crumble_t *crumble)
|
|||
rover->alpha = crumble->origalpha;
|
||||
|
||||
if (rover->alpha == 0xff)
|
||||
rover->flags &= ~FF_TRANSLUCENT;
|
||||
rover->fofflags &= ~FOF_TRANSLUCENT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1082,7 +1082,7 @@ void T_ThwompSector(thwomp_t *thwomp)
|
|||
|
||||
if (thwomp->direction == 0) // Not going anywhere, so look for players.
|
||||
{
|
||||
if (rover->flags & FF_EXISTS)
|
||||
if (rover->fofflags & FOF_EXISTS)
|
||||
{
|
||||
UINT8 i;
|
||||
// scan the players to find victims!
|
||||
|
@ -1175,7 +1175,7 @@ void T_ThwompSector(thwomp_t *thwomp)
|
|||
|
||||
if (res == pastdest)
|
||||
{
|
||||
if (rover->flags & FF_EXISTS)
|
||||
if (rover->fofflags & FOF_EXISTS)
|
||||
S_StartSound((void *)&actionsector->soundorg, thwomp->sound);
|
||||
|
||||
thwomp->direction = 1; // start heading back up
|
||||
|
@ -1928,7 +1928,7 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
|
|||
}
|
||||
|
||||
// no longer exists (can't collide with again)
|
||||
rover->flags &= ~FF_EXISTS;
|
||||
rover->fofflags &= ~FOF_EXISTS;
|
||||
rover->master->frontsector->moved = true;
|
||||
P_RecalcPrecipInSector(sec);
|
||||
}
|
||||
|
@ -2054,8 +2054,8 @@ void EV_MarioBlock(ffloor_t *rover, sector_t *sector, mobj_t *puncher)
|
|||
if (roversec->floordata || roversec->ceilingdata)
|
||||
return;
|
||||
|
||||
if (!(rover->flags & FF_SOLID))
|
||||
rover->flags |= (FF_SOLID|FF_RENDERALL|FF_CUTLEVEL);
|
||||
if (!(rover->fofflags & FOF_SOLID))
|
||||
rover->fofflags |= (FOF_SOLID|FOF_RENDERALL|FOF_CUTLEVEL);
|
||||
|
||||
// Find an item to pop out!
|
||||
thing = SearchMarioNode(roversec->touching_thinglist);
|
||||
|
|
52
src/p_map.c
52
src/p_map.c
|
@ -2073,13 +2073,13 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y)
|
|||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFOFTopZ(thing, newsubsec->sector, rover, x, y, NULL);
|
||||
bottomheight = P_GetFOFBottomZ(thing, newsubsec->sector, rover, x, y, NULL);
|
||||
|
||||
if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER) && !(thing->flags & MF_NOGRAVITY))
|
||||
if ((rover->fofflags & (FOF_SWIMMABLE|FOF_GOOWATER)) == (FOF_SWIMMABLE|FOF_GOOWATER) && !(thing->flags & MF_NOGRAVITY))
|
||||
{
|
||||
// If you're inside goowater and slowing down
|
||||
fixed_t sinklevel = FixedMul(thing->info->height/6, thing->scale);
|
||||
|
@ -2118,14 +2118,14 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y)
|
|||
|
||||
if (thing->player && (P_CheckSolidLava(rover) || P_CanRunOnWater(thing->player, rover)))
|
||||
;
|
||||
else if (thing->type == MT_SKIM && (rover->flags & FF_SWIMMABLE))
|
||||
else if (thing->type == MT_SKIM && (rover->fofflags & FOF_SWIMMABLE))
|
||||
;
|
||||
else if (!((rover->flags & FF_BLOCKPLAYER && thing->player)
|
||||
|| (rover->flags & FF_BLOCKOTHERS && !thing->player)
|
||||
|| rover->flags & FF_QUICKSAND))
|
||||
else if (!((rover->fofflags & FOF_BLOCKPLAYER && thing->player)
|
||||
|| (rover->fofflags & FOF_BLOCKOTHERS && !thing->player)
|
||||
|| rover->fofflags & FOF_QUICKSAND))
|
||||
continue;
|
||||
|
||||
if (rover->flags & FF_QUICKSAND)
|
||||
if (rover->fofflags & FOF_QUICKSAND)
|
||||
{
|
||||
if (thing->z < topheight && bottomheight < thingtop)
|
||||
{
|
||||
|
@ -2145,15 +2145,15 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y)
|
|||
+ ((topheight - bottomheight)/2));
|
||||
|
||||
if (topheight > tmfloorz && abs(delta1) < abs(delta2)
|
||||
&& !(rover->flags & FF_REVERSEPLATFORM))
|
||||
&& !(rover->fofflags & FOF_REVERSEPLATFORM))
|
||||
{
|
||||
tmfloorz = tmdropoffz = topheight;
|
||||
tmfloorrover = rover;
|
||||
tmfloorslope = *rover->t_slope;
|
||||
}
|
||||
if (bottomheight < tmceilingz && abs(delta1) >= abs(delta2)
|
||||
&& !(rover->flags & FF_PLATFORM)
|
||||
&& !(thing->type == MT_SKIM && (rover->flags & FF_SWIMMABLE)))
|
||||
&& !(rover->fofflags & FOF_PLATFORM)
|
||||
&& !(thing->type == MT_SKIM && (rover->fofflags & FOF_SWIMMABLE)))
|
||||
{
|
||||
tmceilingz = tmdrpoffceilz = bottomheight;
|
||||
tmceilingrover = rover;
|
||||
|
@ -2371,7 +2371,7 @@ boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam)
|
|||
for (rover = newsubsec->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if (!(rover->flags & FF_BLOCKOTHERS) || !(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERALL) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA))
|
||||
if (!(rover->fofflags & FOF_BLOCKOTHERS) || !(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERALL) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA))
|
||||
continue;
|
||||
|
||||
topheight = P_CameraGetFOFTopZ(thiscam, newsubsec->sector, rover, x, y, NULL);
|
||||
|
@ -3024,9 +3024,9 @@ static boolean P_ThingHeightClip(mobj_t *thing)
|
|||
{
|
||||
rover = (thing->eflags & MFE_VERTICALFLIP) ? oldceilingrover : oldfloorrover;
|
||||
|
||||
// Match the Thing's old floorz to an FOF and check for FF_EXISTS
|
||||
// If ~FF_EXISTS, don't set mobj Z.
|
||||
if (!rover || ((rover->flags & FF_EXISTS) && (rover->flags & FF_SOLID)))
|
||||
// Match the Thing's old floorz to an FOF and check for FOF_EXISTS
|
||||
// If ~FOF_EXISTS, don't set mobj Z.
|
||||
if (!rover || ((rover->fofflags & FOF_EXISTS) && (rover->fofflags & FOF_SOLID)))
|
||||
{
|
||||
hitfloor = bouncing;
|
||||
if (thing->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -3287,7 +3287,7 @@ static boolean P_IsClimbingValid(player_t *player, angle_t angle)
|
|||
|
||||
for (rover = glidesector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_BLOCKPLAYER))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, mo->x, mo->y);
|
||||
|
@ -3403,7 +3403,7 @@ static void PTR_GlideClimbTraverse(line_t *li)
|
|||
{
|
||||
for (rover = checksector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (slidemo->player->charflags & SF_CANBUSTWALLS)))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (slidemo->player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, slidemo->x, slidemo->y);
|
||||
|
@ -3631,10 +3631,10 @@ static void P_CheckLavaWall(mobj_t *mo, sector_t *sec)
|
|||
|
||||
for (rover = sec->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (!(rover->flags & FF_SWIMMABLE))
|
||||
if (!(rover->fofflags & FOF_SWIMMABLE))
|
||||
continue;
|
||||
|
||||
if (rover->master->frontsector->damagetype != SD_LAVA)
|
||||
|
@ -4241,8 +4241,8 @@ static boolean PIT_ChangeSector(mobj_t *thing, boolean realcrush)
|
|||
|
||||
for (rover = thing->subsector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(((rover->flags & FF_BLOCKPLAYER) && thing->player)
|
||||
|| ((rover->flags & FF_BLOCKOTHERS) && !thing->player)) || !(rover->flags & FF_EXISTS))
|
||||
if (!(((rover->fofflags & FOF_BLOCKPLAYER) && thing->player)
|
||||
|| ((rover->fofflags & FOF_BLOCKOTHERS) && !thing->player)) || !(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
topheight = *rover->topheight;
|
||||
|
@ -5036,16 +5036,16 @@ fixed_t P_FloorzAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height)
|
|||
for (rover = sec->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if ((!(rover->flags & FF_SOLID || rover->flags & FF_QUICKSAND) || (rover->flags & FF_SWIMMABLE)))
|
||||
if ((!(rover->fofflags & FOF_SOLID || rover->fofflags & FOF_QUICKSAND) || (rover->fofflags & FOF_SWIMMABLE)))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, x, y);
|
||||
bottomheight = P_GetFFloorBottomZAt(rover, x, y);
|
||||
|
||||
if (rover->flags & FF_QUICKSAND)
|
||||
if (rover->fofflags & FOF_QUICKSAND)
|
||||
{
|
||||
if (z < topheight && bottomheight < thingtop)
|
||||
{
|
||||
|
@ -5080,16 +5080,16 @@ fixed_t P_CeilingzAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height)
|
|||
for (rover = sec->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if ((!(rover->flags & FF_SOLID || rover->flags & FF_QUICKSAND) || (rover->flags & FF_SWIMMABLE)))
|
||||
if ((!(rover->fofflags & FOF_SOLID || rover->fofflags & FOF_QUICKSAND) || (rover->fofflags & FOF_SWIMMABLE)))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, x, y);
|
||||
bottomheight = P_GetFFloorBottomZAt(rover, x, y);
|
||||
|
||||
if (rover->flags & FF_QUICKSAND)
|
||||
if (rover->fofflags & FOF_QUICKSAND)
|
||||
{
|
||||
if (thingtop > bottomheight && topheight > z)
|
||||
{
|
||||
|
|
|
@ -374,7 +374,7 @@ void P_CameraLineOpening(line_t *linedef)
|
|||
for (rover = front->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if (!(rover->flags & FF_BLOCKOTHERS) || !(rover->flags & FF_RENDERALL) || !(rover->flags & FF_EXISTS) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA))
|
||||
if (!(rover->fofflags & FOF_BLOCKOTHERS) || !(rover->fofflags & FOF_RENDERALL) || !(rover->fofflags & FOF_EXISTS) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA))
|
||||
continue;
|
||||
|
||||
topheight = P_CameraGetFOFTopZ(mapcampointer, front, rover, tmx, tmy, linedef);
|
||||
|
@ -398,7 +398,7 @@ void P_CameraLineOpening(line_t *linedef)
|
|||
for (rover = back->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if (!(rover->flags & FF_BLOCKOTHERS) || !(rover->flags & FF_RENDERALL) || !(rover->flags & FF_EXISTS) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA))
|
||||
if (!(rover->fofflags & FOF_BLOCKOTHERS) || !(rover->fofflags & FOF_RENDERALL) || !(rover->fofflags & FOF_EXISTS) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA))
|
||||
continue;
|
||||
|
||||
topheight = P_CameraGetFOFTopZ(mapcampointer, back, rover, tmx, tmy, linedef);
|
||||
|
@ -594,13 +594,13 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
|||
for (rover = front->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (mobj->player && (P_CheckSolidLava(rover) || P_CanRunOnWater(mobj->player, rover)))
|
||||
;
|
||||
else if (!((rover->flags & FF_BLOCKPLAYER && mobj->player)
|
||||
|| (rover->flags & FF_BLOCKOTHERS && !mobj->player)))
|
||||
else if (!((rover->fofflags & FOF_BLOCKPLAYER && mobj->player)
|
||||
|| (rover->fofflags & FOF_BLOCKOTHERS && !mobj->player)))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFOFTopZ(mobj, front, rover, tmx, tmy, linedef);
|
||||
|
@ -609,7 +609,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
|||
delta1 = abs(mobj->z - (bottomheight + ((topheight - bottomheight)/2)));
|
||||
delta2 = abs(thingtop - (bottomheight + ((topheight - bottomheight)/2)));
|
||||
|
||||
if (delta1 >= delta2 && (rover->flags & FF_INTANGIBLEFLATS) != FF_PLATFORM) // thing is below FOF
|
||||
if (delta1 >= delta2 && (rover->fofflags & FOF_INTANGIBLEFLATS) != FOF_PLATFORM) // thing is below FOF
|
||||
{
|
||||
if (bottomheight < opentop) {
|
||||
opentop = bottomheight;
|
||||
|
@ -620,7 +620,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
|||
highceiling = bottomheight;
|
||||
}
|
||||
|
||||
if (delta1 < delta2 && (rover->flags & FF_INTANGIBLEFLATS) != FF_REVERSEPLATFORM) // thing is above FOF
|
||||
if (delta1 < delta2 && (rover->fofflags & FOF_INTANGIBLEFLATS) != FOF_REVERSEPLATFORM) // thing is above FOF
|
||||
{
|
||||
if (topheight > openbottom) {
|
||||
openbottom = topheight;
|
||||
|
@ -636,13 +636,13 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
|||
for (rover = back->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (mobj->player && (P_CheckSolidLava(rover) || P_CanRunOnWater(mobj->player, rover)))
|
||||
;
|
||||
else if (!((rover->flags & FF_BLOCKPLAYER && mobj->player)
|
||||
|| (rover->flags & FF_BLOCKOTHERS && !mobj->player)))
|
||||
else if (!((rover->fofflags & FOF_BLOCKPLAYER && mobj->player)
|
||||
|| (rover->fofflags & FOF_BLOCKOTHERS && !mobj->player)))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFOFTopZ(mobj, back, rover, tmx, tmy, linedef);
|
||||
|
@ -651,7 +651,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
|||
delta1 = abs(mobj->z - (bottomheight + ((topheight - bottomheight)/2)));
|
||||
delta2 = abs(thingtop - (bottomheight + ((topheight - bottomheight)/2)));
|
||||
|
||||
if (delta1 >= delta2 && (rover->flags & FF_INTANGIBLEFLATS) != FF_PLATFORM) // thing is below FOF
|
||||
if (delta1 >= delta2 && (rover->fofflags & FOF_INTANGIBLEFLATS) != FOF_PLATFORM) // thing is below FOF
|
||||
{
|
||||
if (bottomheight < opentop) {
|
||||
opentop = bottomheight;
|
||||
|
@ -662,7 +662,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
|||
highceiling = bottomheight;
|
||||
}
|
||||
|
||||
if (delta1 < delta2 && (rover->flags & FF_INTANGIBLEFLATS) != FF_REVERSEPLATFORM) // thing is above FOF
|
||||
if (delta1 < delta2 && (rover->fofflags & FOF_INTANGIBLEFLATS) != FOF_REVERSEPLATFORM) // thing is above FOF
|
||||
{
|
||||
if (topheight > openbottom) {
|
||||
openbottom = topheight;
|
||||
|
|
88
src/p_mobj.c
88
src/p_mobj.c
|
@ -955,11 +955,11 @@ void P_ExplodeMissile(mobj_t *mo)
|
|||
boolean P_InsideANonSolidFFloor(mobj_t *mobj, ffloor_t *rover)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
return false;
|
||||
|
||||
if ((((rover->flags & FF_BLOCKPLAYER) && mobj->player)
|
||||
|| ((rover->flags & FF_BLOCKOTHERS) && !mobj->player)))
|
||||
if ((((rover->fofflags & FOF_BLOCKPLAYER) && mobj->player)
|
||||
|| ((rover->fofflags & FOF_BLOCKOTHERS) && !mobj->player)))
|
||||
return false;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, mobj->x, mobj->y);
|
||||
|
@ -1450,10 +1450,10 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
|
||||
for (rover = mo->subsector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !P_InsideANonSolidFFloor(mo, rover)) // P_InsideANonSolidFFloor checks for FF_EXISTS itself, but let's not always call this function
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !P_InsideANonSolidFFloor(mo, rover)) // P_InsideANonSolidFFloor checks for FOF_EXISTS itself, but let's not always call this function
|
||||
continue;
|
||||
|
||||
if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER))
|
||||
if ((rover->fofflags & (FOF_SWIMMABLE|FOF_GOOWATER)) == (FOF_SWIMMABLE|FOF_GOOWATER))
|
||||
goopgravity = true;
|
||||
|
||||
gravfactor = P_GetSectorGravityFactor(mo->subsector->sector);
|
||||
|
@ -1714,10 +1714,10 @@ static void P_PushableCheckBustables(mobj_t *mo)
|
|||
|
||||
for (rover = node->m_sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (!(rover->flags & FF_BUSTUP))
|
||||
if (!(rover->fofflags & FOF_BUSTUP))
|
||||
continue;
|
||||
|
||||
if (!(rover->bustflags & FB_PUSHABLES))
|
||||
|
@ -2168,7 +2168,7 @@ void P_AdjustMobjFloorZ_FFloors(mobj_t *mo, sector_t *sector, UINT8 motype)
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFOFTopZ(mo, sector, rover, mo->x, mo->y, NULL);
|
||||
|
@ -2176,16 +2176,16 @@ void P_AdjustMobjFloorZ_FFloors(mobj_t *mo, sector_t *sector, UINT8 motype)
|
|||
|
||||
if (mo->player && (P_CheckSolidLava(rover) || P_CanRunOnWater(mo->player, rover))) // only the player should stand on lava or run on water
|
||||
;
|
||||
else if (motype != 0 && rover->flags & FF_SWIMMABLE) // "scenery" only
|
||||
else if (motype != 0 && rover->fofflags & FOF_SWIMMABLE) // "scenery" only
|
||||
continue;
|
||||
else if (rover->flags & FF_QUICKSAND) // quicksand
|
||||
else if (rover->fofflags & FOF_QUICKSAND) // quicksand
|
||||
;
|
||||
else if (!( // if it's not either of the following...
|
||||
(rover->flags & (FF_BLOCKPLAYER|FF_MARIO) && mo->player) // ...solid to players? (mario blocks are always solid from beneath to players)
|
||||
|| (rover->flags & FF_BLOCKOTHERS && !mo->player) // ...solid to others?
|
||||
(rover->fofflags & (FOF_BLOCKPLAYER|FOF_MARIO) && mo->player) // ...solid to players? (mario blocks are always solid from beneath to players)
|
||||
|| (rover->fofflags & FOF_BLOCKOTHERS && !mo->player) // ...solid to others?
|
||||
)) // ...don't take it into account.
|
||||
continue;
|
||||
if (rover->flags & FF_QUICKSAND)
|
||||
if (rover->fofflags & FOF_QUICKSAND)
|
||||
{
|
||||
switch (motype)
|
||||
{
|
||||
|
@ -2210,15 +2210,15 @@ void P_AdjustMobjFloorZ_FFloors(mobj_t *mo, sector_t *sector, UINT8 motype)
|
|||
delta2 = thingtop - (bottomheight + ((topheight - bottomheight)/2));
|
||||
|
||||
if (topheight > mo->floorz && abs(delta1) < abs(delta2)
|
||||
&& (rover->flags & FF_SOLID) // Non-FF_SOLID Mario blocks are only solid from bottom
|
||||
&& !(rover->flags & FF_REVERSEPLATFORM)
|
||||
&& ((P_MobjFlip(mo)*mo->momz >= 0) || (!(rover->flags & FF_PLATFORM)))) // In reverse gravity, only clip for FOFs that are intangible from their bottom (the "top" you're falling through) if you're coming from above ("below" in your frame of reference)
|
||||
&& (rover->fofflags & FOF_SOLID) // Non-FOF_SOLID Mario blocks are only solid from bottom
|
||||
&& !(rover->fofflags & FOF_REVERSEPLATFORM)
|
||||
&& ((P_MobjFlip(mo)*mo->momz >= 0) || (!(rover->fofflags & FOF_PLATFORM)))) // In reverse gravity, only clip for FOFs that are intangible from their bottom (the "top" you're falling through) if you're coming from above ("below" in your frame of reference)
|
||||
{
|
||||
mo->floorz = topheight;
|
||||
}
|
||||
if (bottomheight < mo->ceilingz && abs(delta1) >= abs(delta2)
|
||||
&& !(rover->flags & FF_PLATFORM)
|
||||
&& ((P_MobjFlip(mo)*mo->momz >= 0) || ((rover->flags & FF_SOLID) && !(rover->flags & FF_REVERSEPLATFORM)))) // In normal gravity, only clip for FOFs that are intangible from the top if you're coming from below
|
||||
&& !(rover->fofflags & FOF_PLATFORM)
|
||||
&& ((P_MobjFlip(mo)*mo->momz >= 0) || ((rover->fofflags & FOF_SOLID) && !(rover->fofflags & FOF_REVERSEPLATFORM)))) // In normal gravity, only clip for FOFs that are intangible from the top if you're coming from below
|
||||
{
|
||||
mo->ceilingz = bottomheight;
|
||||
}
|
||||
|
@ -2334,7 +2334,7 @@ boolean P_CheckDeathPitCollide(mobj_t *mo)
|
|||
|
||||
boolean P_CheckSolidLava(ffloor_t *rover)
|
||||
{
|
||||
return (rover->flags & FF_SWIMMABLE) && (rover->master->frontsector->damagetype == SD_LAVA);
|
||||
return (rover->fofflags & FOF_SWIMMABLE) && (rover->master->frontsector->damagetype == SD_LAVA);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -2828,10 +2828,10 @@ static void P_CheckMarioBlocks(mobj_t *mo)
|
|||
|
||||
for (rover = node->m_sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (!(rover->flags & FF_MARIO))
|
||||
if (!(rover->fofflags & FOF_MARIO))
|
||||
continue;
|
||||
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -2840,7 +2840,7 @@ static void P_CheckMarioBlocks(mobj_t *mo)
|
|||
if (*rover->bottomheight != mo->ceilingz)
|
||||
continue;
|
||||
|
||||
if (rover->flags & FF_GOOWATER) // Brick block!
|
||||
if (rover->fofflags & FOF_GOOWATER) // Brick block!
|
||||
EV_CrumbleChain(node->m_sector, rover);
|
||||
else // Question block!
|
||||
EV_MarioBlock(rover, node->m_sector, mo);
|
||||
|
@ -3230,7 +3230,7 @@ boolean P_CanRunOnWater(player_t *player, ffloor_t *rover)
|
|||
|
||||
if (!player->powers[pw_carry] && !player->homing
|
||||
&& ((player->powers[pw_super] || player->charflags & SF_RUNONWATER || player->dashmode >= DASHMODE_THRESHOLD) && doifit)
|
||||
&& (rover->flags & FF_SWIMMABLE) && !(player->pflags & PF_SPINNING) && player->speed > FixedMul(player->runspeed, player->mo->scale)
|
||||
&& (rover->fofflags & FOF_SWIMMABLE) && !(player->pflags & PF_SPINNING) && player->speed > FixedMul(player->runspeed, player->mo->scale)
|
||||
&& !(player->pflags & PF_SLIDING)
|
||||
&& abs(playerbottom - surfaceheight) < FixedMul(30*FRACUNIT, player->mo->scale))
|
||||
return true;
|
||||
|
@ -3264,9 +3264,9 @@ void P_MobjCheckWater(mobj_t *mobj)
|
|||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE)
|
||||
|| (((rover->flags & FF_BLOCKPLAYER) && mobj->player)
|
||||
|| ((rover->flags & FF_BLOCKOTHERS) && !mobj->player)))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE)
|
||||
|| (((rover->fofflags & FOF_BLOCKPLAYER) && mobj->player)
|
||||
|| ((rover->fofflags & FOF_BLOCKOTHERS) && !mobj->player)))
|
||||
continue;
|
||||
|
||||
topheight = P_GetSpecialTopZ(mobj, sectors + rover->secnum, sector);
|
||||
|
@ -3304,7 +3304,7 @@ void P_MobjCheckWater(mobj_t *mobj)
|
|||
if (rover->master->frontsector->damagetype == SD_FIRE || rover->master->frontsector->damagetype == SD_LAVA)
|
||||
mobj->eflags |= MFE_TOUCHLAVA;
|
||||
|
||||
if (rover->flags & FF_GOOWATER && !(mobj->flags & MF_NOGRAVITY))
|
||||
if (rover->fofflags & FOF_GOOWATER && !(mobj->flags & MF_NOGRAVITY))
|
||||
mobj->eflags |= MFE_GOOWATER;
|
||||
}
|
||||
}
|
||||
|
@ -3512,7 +3512,7 @@ static void P_SceneryCheckWater(mobj_t *mobj)
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE) || rover->flags & FF_BLOCKOTHERS)
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE) || rover->fofflags & FOF_BLOCKOTHERS)
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, mobj->x, mobj->y);
|
||||
|
@ -3558,7 +3558,7 @@ static boolean P_CameraCheckHeat(camera_t *thiscam)
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (halfheight >= P_GetFFloorTopZAt(rover, thiscam->x, thiscam->y))
|
||||
|
@ -3588,7 +3588,7 @@ static boolean P_CameraCheckWater(camera_t *thiscam)
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE) || rover->flags & FF_BLOCKOTHERS)
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE) || rover->fofflags & FOF_BLOCKOTHERS)
|
||||
continue;
|
||||
|
||||
if (halfheight >= P_GetFFloorTopZAt(rover, thiscam->x, thiscam->y))
|
||||
|
@ -3782,10 +3782,10 @@ static void P_CheckCrumblingPlatforms(mobj_t *mobj)
|
|||
|
||||
for (rover = node->m_sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (!(rover->flags & FF_CRUMBLE))
|
||||
if (!(rover->fofflags & FOF_CRUMBLE))
|
||||
continue;
|
||||
|
||||
if (mobj->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -3799,7 +3799,7 @@ static void P_CheckCrumblingPlatforms(mobj_t *mobj)
|
|||
continue;
|
||||
}
|
||||
|
||||
EV_StartCrumble(rover->master->frontsector, rover, (rover->flags & FF_FLOATBOB), mobj->player, rover->alpha, !(rover->flags & FF_NORETURN));
|
||||
EV_StartCrumble(rover->master->frontsector, rover, (rover->fofflags & FOF_FLOATBOB), mobj->player, rover->alpha, !(rover->fofflags & FOF_NORETURN));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3817,10 +3817,10 @@ static boolean P_MobjTouchesSectorWithWater(mobj_t *mobj)
|
|||
|
||||
for (rover = node->m_sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (!(rover->flags & FF_SWIMMABLE))
|
||||
if (!(rover->fofflags & FOF_SWIMMABLE))
|
||||
continue;
|
||||
|
||||
return true;
|
||||
|
@ -3851,10 +3851,10 @@ static void P_CheckFloatbobPlatforms(mobj_t *mobj)
|
|||
|
||||
for (rover = node->m_sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (!(rover->flags & FF_FLOATBOB))
|
||||
if (!(rover->fofflags & FOF_FLOATBOB))
|
||||
continue;
|
||||
|
||||
|
||||
|
@ -3984,10 +3984,10 @@ static void CalculatePrecipFloor(precipmobj_t *mobj)
|
|||
for (rover = mobjsecsubsec->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
// If it exists, it'll get rained on.
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (!(rover->flags & FF_BLOCKOTHERS) && !(rover->flags & FF_SWIMMABLE))
|
||||
if (!(rover->fofflags & FOF_BLOCKOTHERS) && !(rover->fofflags & FOF_SWIMMABLE))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt(rover, mobj->x, mobj->y);
|
||||
|
@ -4090,9 +4090,9 @@ static void P_KillRingsInLava(mobj_t *mo)
|
|||
|
||||
for (rover = node->m_sector->ffloors; rover; rover = rover->next) // go through all fofs in the sector
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS)) continue; // fof must be real
|
||||
if (!(rover->fofflags & FOF_EXISTS)) continue; // fof must be real
|
||||
|
||||
if (!(rover->flags & FF_SWIMMABLE))
|
||||
if (!(rover->fofflags & FOF_SWIMMABLE))
|
||||
continue; // fof must be water
|
||||
|
||||
if (rover->master->frontsector->damagetype != SD_FIRE && rover->master->frontsector->damagetype != SD_LAVA)
|
||||
|
@ -4733,14 +4733,14 @@ static void P_Boss4DestroyCage(mobj_t *mobj)
|
|||
{
|
||||
rsec = §ors[sector->attached[a]];
|
||||
for (rover = rsec->ffloors; rover; rover = rover->next)
|
||||
if (rover->flags & FF_EXISTS && rover->secnum == (size_t)snum)
|
||||
if (rover->fofflags & FOF_EXISTS && rover->secnum == (size_t)snum)
|
||||
{
|
||||
if (rover->flags & FF_RENDERALL) // checking for FF_RENDERANY.
|
||||
if (rover->fofflags & FOF_RENDERALL) // checking for FF_RENDERANY.
|
||||
EV_CrumbleChain(rsec, rover); // This FOF is visible to some extent? Crumble it.
|
||||
else // Completely invisible FOF
|
||||
{
|
||||
// no longer exists (can't collide with again)
|
||||
rover->flags &= ~FF_EXISTS;
|
||||
rover->fofflags &= ~FOF_EXISTS;
|
||||
sector->moved = true;
|
||||
rsec->moved = true;
|
||||
}
|
||||
|
|
|
@ -915,7 +915,7 @@ static boolean CheckFFloorDiff(const sector_t *ss)
|
|||
|
||||
for (rover = ss->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (rover->flags != rover->spawnflags
|
||||
if (rover->fofflags != rover->spawnflags
|
||||
|| rover->alpha != rover->spawnalpha)
|
||||
{
|
||||
return true; // we found an FOF that changed!
|
||||
|
@ -935,7 +935,7 @@ static void ArchiveFFloors(const sector_t *ss)
|
|||
for (rover = ss->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fflr_diff = 0; // reset diff flags
|
||||
if (rover->flags != rover->spawnflags)
|
||||
if (rover->fofflags != rover->spawnflags)
|
||||
fflr_diff |= FD_FLAGS;
|
||||
if (rover->alpha != rover->spawnalpha)
|
||||
fflr_diff |= FD_ALPHA;
|
||||
|
@ -945,7 +945,7 @@ static void ArchiveFFloors(const sector_t *ss)
|
|||
WRITEUINT16(save_p, j); // save ffloor "number"
|
||||
WRITEUINT8(save_p, fflr_diff);
|
||||
if (fflr_diff & FD_FLAGS)
|
||||
WRITEUINT32(save_p, rover->flags);
|
||||
WRITEUINT32(save_p, rover->fofflags);
|
||||
if (fflr_diff & FD_ALPHA)
|
||||
WRITEINT16(save_p, rover->alpha);
|
||||
}
|
||||
|
@ -983,7 +983,7 @@ static void UnArchiveFFloors(const sector_t *ss)
|
|||
fflr_diff = READUINT8(save_p);
|
||||
|
||||
if (fflr_diff & FD_FLAGS)
|
||||
rover->flags = READUINT32(save_p);
|
||||
rover->fofflags = READUINT32(save_p);
|
||||
if (fflr_diff & FD_ALPHA)
|
||||
rover->alpha = READINT16(save_p);
|
||||
|
||||
|
|
|
@ -2150,9 +2150,9 @@ static void P_WriteTextmap(void)
|
|||
freetag = Tag_NextUnused(freetag);
|
||||
break;
|
||||
case 259:
|
||||
if (wlines[i].args[3] & FF_QUICKSAND)
|
||||
if (wlines[i].args[3] & FOF_QUICKSAND)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Quicksand properties of custom FOF on linedef %d cannot be converted. Use linedef type 75 instead.\n"), i);
|
||||
if (wlines[i].args[3] & FF_BUSTUP)
|
||||
if (wlines[i].args[3] & FOF_BUSTUP)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Bustable properties of custom FOF on linedef %d cannot be converted. Use linedef type 74 instead.\n"), i);
|
||||
break;
|
||||
case 412:
|
||||
|
@ -3993,67 +3993,67 @@ static INT32 P_GetFOFFlags(INT32 oldflags)
|
|||
{
|
||||
INT32 result = 0;
|
||||
if (oldflags & FF_OLD_EXISTS)
|
||||
result |= FF_EXISTS;
|
||||
result |= FOF_EXISTS;
|
||||
if (oldflags & FF_OLD_BLOCKPLAYER)
|
||||
result |= FF_BLOCKPLAYER;
|
||||
result |= FOF_BLOCKPLAYER;
|
||||
if (oldflags & FF_OLD_BLOCKOTHERS)
|
||||
result |= FF_BLOCKOTHERS;
|
||||
result |= FOF_BLOCKOTHERS;
|
||||
if (oldflags & FF_OLD_RENDERSIDES)
|
||||
result |= FF_RENDERSIDES;
|
||||
result |= FOF_RENDERSIDES;
|
||||
if (oldflags & FF_OLD_RENDERPLANES)
|
||||
result |= FF_RENDERPLANES;
|
||||
result |= FOF_RENDERPLANES;
|
||||
if (oldflags & FF_OLD_SWIMMABLE)
|
||||
result |= FF_SWIMMABLE;
|
||||
result |= FOF_SWIMMABLE;
|
||||
if (oldflags & FF_OLD_NOSHADE)
|
||||
result |= FF_NOSHADE;
|
||||
result |= FOF_NOSHADE;
|
||||
if (oldflags & FF_OLD_CUTSOLIDS)
|
||||
result |= FF_CUTSOLIDS;
|
||||
result |= FOF_CUTSOLIDS;
|
||||
if (oldflags & FF_OLD_CUTEXTRA)
|
||||
result |= FF_CUTEXTRA;
|
||||
result |= FOF_CUTEXTRA;
|
||||
if (oldflags & FF_OLD_CUTSPRITES)
|
||||
result |= FF_CUTSPRITES;
|
||||
result |= FOF_CUTSPRITES;
|
||||
if (oldflags & FF_OLD_BOTHPLANES)
|
||||
result |= FF_BOTHPLANES;
|
||||
result |= FOF_BOTHPLANES;
|
||||
if (oldflags & FF_OLD_EXTRA)
|
||||
result |= FF_EXTRA;
|
||||
result |= FOF_EXTRA;
|
||||
if (oldflags & FF_OLD_TRANSLUCENT)
|
||||
result |= FF_TRANSLUCENT;
|
||||
result |= FOF_TRANSLUCENT;
|
||||
if (oldflags & FF_OLD_FOG)
|
||||
result |= FF_FOG;
|
||||
result |= FOF_FOG;
|
||||
if (oldflags & FF_OLD_INVERTPLANES)
|
||||
result |= FF_INVERTPLANES;
|
||||
result |= FOF_INVERTPLANES;
|
||||
if (oldflags & FF_OLD_ALLSIDES)
|
||||
result |= FF_ALLSIDES;
|
||||
result |= FOF_ALLSIDES;
|
||||
if (oldflags & FF_OLD_INVERTSIDES)
|
||||
result |= FF_INVERTSIDES;
|
||||
result |= FOF_INVERTSIDES;
|
||||
if (oldflags & FF_OLD_DOUBLESHADOW)
|
||||
result |= FF_DOUBLESHADOW;
|
||||
result |= FOF_DOUBLESHADOW;
|
||||
if (oldflags & FF_OLD_FLOATBOB)
|
||||
result |= FF_FLOATBOB;
|
||||
result |= FOF_FLOATBOB;
|
||||
if (oldflags & FF_OLD_NORETURN)
|
||||
result |= FF_NORETURN;
|
||||
result |= FOF_NORETURN;
|
||||
if (oldflags & FF_OLD_CRUMBLE)
|
||||
result |= FF_CRUMBLE;
|
||||
result |= FOF_CRUMBLE;
|
||||
if (oldflags & FF_OLD_GOOWATER)
|
||||
result |= FF_GOOWATER;
|
||||
result |= FOF_GOOWATER;
|
||||
if (oldflags & FF_OLD_MARIO)
|
||||
result |= FF_MARIO;
|
||||
result |= FOF_MARIO;
|
||||
if (oldflags & FF_OLD_BUSTUP)
|
||||
result |= FF_BUSTUP;
|
||||
result |= FOF_BUSTUP;
|
||||
if (oldflags & FF_OLD_QUICKSAND)
|
||||
result |= FF_QUICKSAND;
|
||||
result |= FOF_QUICKSAND;
|
||||
if (oldflags & FF_OLD_PLATFORM)
|
||||
result |= FF_PLATFORM;
|
||||
result |= FOF_PLATFORM;
|
||||
if (oldflags & FF_OLD_REVERSEPLATFORM)
|
||||
result |= FF_REVERSEPLATFORM;
|
||||
result |= FOF_REVERSEPLATFORM;
|
||||
if (oldflags & FF_OLD_RIPPLE)
|
||||
result |= FF_RIPPLE;
|
||||
result |= FOF_RIPPLE;
|
||||
if (oldflags & FF_OLD_COLORMAPONLY)
|
||||
result |= FF_COLORMAPONLY;
|
||||
result |= FOF_COLORMAPONLY;
|
||||
return result;
|
||||
}
|
||||
|
||||
static INT32 P_GetFOFBustflags(INT32 oldflags)
|
||||
static INT32 P_GetFOFBusttype(INT32 oldflags)
|
||||
{
|
||||
if (oldflags & FF_OLD_SHATTER)
|
||||
return TMFB_TOUCH;
|
||||
|
@ -4712,17 +4712,17 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[0] = tag;
|
||||
lines[i].args[3] = P_GetFOFFlags(sides[lines[i].sidenum[1]].toptexture);
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
lines[i].args[3] |= FF_SPLAT;
|
||||
lines[i].args[4] = P_GetFOFBustflags(sides[lines[i].sidenum[1]].toptexture);
|
||||
lines[i].args[3] |= FOF_SPLAT;
|
||||
lines[i].args[4] = P_GetFOFBusttype(sides[lines[i].sidenum[1]].toptexture);
|
||||
if (sides[lines[i].sidenum[1]].toptexture & FF_OLD_SHATTERBOTTOM)
|
||||
lines[i].args[4] |= TMFB_ONLYBOTTOM;
|
||||
if (lines[i].args[3] & FF_TRANSLUCENT)
|
||||
if (lines[i].args[3] & FOF_TRANSLUCENT)
|
||||
{
|
||||
P_SetBinaryFOFAlpha(&lines[i]);
|
||||
|
||||
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
|
||||
if (lines[i].args[1] == 256)
|
||||
lines[i].args[3] |= FF_SPLAT;
|
||||
lines[i].args[3] |= FOF_SPLAT;
|
||||
}
|
||||
else
|
||||
lines[i].args[1] = 255;
|
||||
|
@ -5921,7 +5921,7 @@ static void P_ConvertBinarySectorTypes(void)
|
|||
if (line->flags & ML_BLOCKMONSTERS)
|
||||
continue;
|
||||
|
||||
if (line->special == 120 || (line->special == 259 && (line->args[2] & FF_SWIMMABLE)))
|
||||
if (line->special == 120 || (line->special == 259 && (line->args[2] & FOF_SWIMMABLE)))
|
||||
{
|
||||
isLava = true;
|
||||
break;
|
||||
|
|
|
@ -306,8 +306,8 @@ static boolean P_CrossSubsector(size_t num, register los_t *los)
|
|||
// check front sector's FOFs first
|
||||
for (rover = front->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS)
|
||||
|| !(rover->flags & FF_RENDERSIDES) || (rover->flags & (FF_TRANSLUCENT|FF_FOG)))
|
||||
if (!(rover->fofflags & FOF_EXISTS)
|
||||
|| !(rover->fofflags & FOF_RENDERSIDES) || (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -322,8 +322,8 @@ static boolean P_CrossSubsector(size_t num, register los_t *los)
|
|||
// check back sector's FOFs as well
|
||||
for (rover = back->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS)
|
||||
|| !(rover->flags & FF_RENDERSIDES) || (rover->flags & (FF_TRANSLUCENT|FF_FOG)))
|
||||
if (!(rover->fofflags & FOF_EXISTS)
|
||||
|| !(rover->fofflags & FOF_RENDERSIDES) || (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -451,8 +451,8 @@ boolean P_CheckSight(mobj_t *t1, mobj_t *t2)
|
|||
// Allow sight through water, fog, etc.
|
||||
/// \todo Improve by checking fog density/translucency
|
||||
/// and setting a sight limit.
|
||||
if (!(rover->flags & FF_EXISTS)
|
||||
|| !(rover->flags & FF_RENDERPLANES) || (rover->flags & (FF_TRANSLUCENT|FF_FOG)))
|
||||
if (!(rover->fofflags & FOF_EXISTS)
|
||||
|| !(rover->fofflags & FOF_RENDERPLANES) || (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -470,10 +470,10 @@ boolean P_CheckSight(mobj_t *t1, mobj_t *t2)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (rover->flags & FF_SOLID)
|
||||
if (rover->fofflags & FOF_SOLID)
|
||||
continue; // shortcut since neither mobj can be inside the 3dfloor
|
||||
|
||||
if (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))
|
||||
if (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))
|
||||
{
|
||||
if (los.sightzstart >= topz1 && t2->z + t2->height < topz2)
|
||||
return false; // blocked by upper outside plane
|
||||
|
@ -482,7 +482,7 @@ boolean P_CheckSight(mobj_t *t1, mobj_t *t2)
|
|||
return false; // blocked by lower outside plane
|
||||
}
|
||||
|
||||
if (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)
|
||||
if (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES)
|
||||
{
|
||||
if (los.sightzstart < topz1 && t2->z >= topz2)
|
||||
return false; // blocked by upper inside plane
|
||||
|
|
502
src/p_spec.c
502
src/p_spec.c
File diff suppressed because it is too large
Load diff
|
@ -1028,8 +1028,8 @@ typedef struct
|
|||
INT16 speed; ///< Speed to fade by
|
||||
boolean ticbased; ///< Tic-based logic toggle
|
||||
INT32 timer; ///< Timer for tic-based logic
|
||||
boolean doexists; ///< Handle FF_EXISTS
|
||||
boolean dotranslucent; ///< Handle FF_TRANSLUCENT
|
||||
boolean doexists; ///< Handle FOF_EXISTS
|
||||
boolean dotranslucent; ///< Handle FOF_TRANSLUCENT
|
||||
boolean dolighting; ///< Handle shadows and light blocks
|
||||
boolean docolormap; ///< Handle colormaps
|
||||
boolean docollision; ///< Handle interactive flags
|
||||
|
|
50
src/p_user.c
50
src/p_user.c
|
@ -2209,7 +2209,7 @@ boolean P_InSpaceSector(mobj_t *mo) // Returns true if you are in space
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (!(rover->master->frontsector->specialflags & SSF_OUTERSPACE))
|
||||
|
@ -2462,10 +2462,10 @@ boolean P_InQuicksand(mobj_t *mo) // Returns true if you are in quicksand
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (!(rover->flags & FF_QUICKSAND))
|
||||
if (!(rover->fofflags & FOF_QUICKSAND))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, mo->x, mo->y);
|
||||
|
@ -2486,10 +2486,10 @@ boolean P_InQuicksand(mobj_t *mo) // Returns true if you are in quicksand
|
|||
|
||||
static boolean P_PlayerCanBust(player_t *player, ffloor_t *rover)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
return false;
|
||||
|
||||
if (!(rover->flags & FF_BUSTUP))
|
||||
if (!(rover->fofflags & FOF_BUSTUP))
|
||||
return false;
|
||||
|
||||
/*if (rover->master->frontsector->crumblestate != CRUMBLE_NONE)
|
||||
|
@ -2701,17 +2701,17 @@ static void P_CheckBouncySectors(player_t *player)
|
|||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue; // FOFs should not be bouncy if they don't even "exist"
|
||||
|
||||
// Handle deprecated bouncy FOF sector type
|
||||
if (!udmf && GETSECSPECIAL(rover->master->frontsector->special, 1) == 15)
|
||||
{
|
||||
rover->flags |= FF_BOUNCY;
|
||||
rover->fofflags |= FOF_BOUNCY;
|
||||
rover->bouncestrength = P_AproxDistance(rover->master->dx, rover->master->dy)/100;
|
||||
}
|
||||
|
||||
if (!(rover->flags & FF_BOUNCY))
|
||||
if (!(rover->fofflags & FOF_BOUNCY))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
||||
|
@ -2784,9 +2784,9 @@ static void P_CheckQuicksand(player_t *player)
|
|||
|
||||
for (rover = player->mo->subsector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS)) continue;
|
||||
if (!(rover->fofflags & FOF_EXISTS)) continue;
|
||||
|
||||
if (!(rover->flags & FF_QUICKSAND))
|
||||
if (!(rover->fofflags & FOF_QUICKSAND))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, player->mo->x, player->mo->y);
|
||||
|
@ -3136,7 +3136,7 @@ static void P_DoClimbing(player_t *player)
|
|||
|
||||
for (rover = glidesector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
floorclimb = true;
|
||||
|
@ -3177,7 +3177,7 @@ static void P_DoClimbing(player_t *player)
|
|||
// Is there a FOF directly below this one that we can move onto?
|
||||
for (roverbelow = glidesector->sector->ffloors; roverbelow; roverbelow = roverbelow->next)
|
||||
{
|
||||
if (!(roverbelow->flags & FF_EXISTS) || !(roverbelow->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
if (!(roverbelow->fofflags & FOF_EXISTS) || !(roverbelow->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
if (roverbelow == rover)
|
||||
|
@ -3222,7 +3222,7 @@ static void P_DoClimbing(player_t *player)
|
|||
// Is there a FOF directly below this one that we can move onto?
|
||||
for (roverbelow = glidesector->sector->ffloors; roverbelow; roverbelow = roverbelow->next)
|
||||
{
|
||||
if (!(roverbelow->flags & FF_EXISTS) || !(roverbelow->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
if (!(roverbelow->fofflags & FOF_EXISTS) || !(roverbelow->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
if (roverbelow == rover)
|
||||
|
@ -3256,8 +3256,8 @@ static void P_DoClimbing(player_t *player)
|
|||
|
||||
if (floorclimb)
|
||||
{
|
||||
if (rover->flags & FF_CRUMBLE && !(netgame && player->spectator))
|
||||
EV_StartCrumble(rover->master->frontsector, rover, (rover->flags & FF_FLOATBOB), player, rover->alpha, !(rover->flags & FF_NORETURN));
|
||||
if (rover->fofflags & FOF_CRUMBLE && !(netgame && player->spectator))
|
||||
EV_StartCrumble(rover->master->frontsector, rover, (rover->fofflags & FOF_FLOATBOB), player, rover->alpha, !(rover->fofflags & FOF_NORETURN));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3279,7 +3279,7 @@ static void P_DoClimbing(player_t *player)
|
|||
ffloor_t *rover;
|
||||
for (rover = glidesector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
bottomheight = P_GetFFloorBottomZAt(rover, player->mo->x, player->mo->y);
|
||||
|
@ -3319,7 +3319,7 @@ static void P_DoClimbing(player_t *player)
|
|||
ffloor_t *rover;
|
||||
for (rover = glidesector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS)))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt(rover, player->mo->x, player->mo->y);
|
||||
|
@ -3693,14 +3693,14 @@ static void P_DoTeeter(player_t *player)
|
|||
|
||||
for (rover = sec->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS)) continue;
|
||||
if (!(rover->fofflags & FOF_EXISTS)) continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, player->mo->x, player->mo->y);
|
||||
bottomheight = P_GetFFloorBottomZAt(rover, player->mo->x, player->mo->y);
|
||||
|
||||
if (P_CheckSolidLava(rover))
|
||||
;
|
||||
else if (!(rover->flags & FF_BLOCKPLAYER || rover->flags & FF_QUICKSAND))
|
||||
else if (!(rover->fofflags & FOF_BLOCKPLAYER || rover->fofflags & FOF_QUICKSAND))
|
||||
continue; // intangible 3d floor
|
||||
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -10072,7 +10072,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
for (rover = newsubsec->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if (!(rover->flags & FF_BLOCKOTHERS) || !(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERALL) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA))
|
||||
if (!(rover->fofflags & FOF_BLOCKOTHERS) || !(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERALL) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA))
|
||||
continue;
|
||||
|
||||
topheight = P_CameraGetFOFTopZ(thiscam, newsubsec->sector, rover, midx, midy, NULL);
|
||||
|
@ -10198,7 +10198,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
for (rover = newsubsec->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if ((rover->flags & FF_BLOCKOTHERS) && (rover->flags & FF_RENDERALL) && (rover->flags & FF_EXISTS) && !(rover->master->frontsector->flags & MSF_NOCLIPCAMERA))
|
||||
if ((rover->fofflags & FOF_BLOCKOTHERS) && (rover->fofflags & FOF_RENDERALL) && (rover->fofflags & FOF_EXISTS) && !(rover->master->frontsector->flags & MSF_NOCLIPCAMERA))
|
||||
{
|
||||
topheight = P_CameraGetFOFTopZ(thiscam, newsubsec->sector, rover, midx, midy, NULL);
|
||||
bottomheight = P_CameraGetFOFBottomZ(thiscam, newsubsec->sector, rover, midx, midy, NULL);
|
||||
|
@ -10515,7 +10515,7 @@ static void P_CalcPostImg(player_t *player)
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, player->mo->x, player->mo->y);
|
||||
|
@ -10541,7 +10541,7 @@ static void P_CalcPostImg(player_t *player)
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE) || rover->flags & FF_BLOCKPLAYER)
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE) || rover->fofflags & FOF_BLOCKPLAYER)
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt (rover, player->mo->x, player->mo->y);
|
||||
|
@ -10604,7 +10604,7 @@ static sector_t *P_GetMinecartSector(fixed_t x, fixed_t y, fixed_t z, fixed_t *n
|
|||
ffloor_t *rover;
|
||||
for (rover = sec->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & (FF_EXISTS|FF_BLOCKOTHERS)))
|
||||
if (!(rover->fofflags & (FOF_EXISTS|FOF_BLOCKOTHERS)))
|
||||
continue;
|
||||
|
||||
*nz = P_GetFFloorTopZAt(rover, x, y);
|
||||
|
@ -12248,7 +12248,7 @@ static boolean P_MobjAboveLava(mobj_t *mobj)
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE))
|
||||
continue;
|
||||
|
||||
if (rover->master->frontsector->damagetype != SD_FIRE && rover->master->frontsector->damagetype != SD_LAVA)
|
||||
|
|
30
src/r_bsp.c
30
src/r_bsp.c
|
@ -919,7 +919,7 @@ static void R_Subsector(size_t num)
|
|||
|
||||
for (rover = frontsector->ffloors; rover && numffloors < MAXFFLOORS; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERPLANES))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES))
|
||||
continue;
|
||||
|
||||
if (frontsector->cullheight)
|
||||
|
@ -939,8 +939,8 @@ static void R_Subsector(size_t num)
|
|||
planecenterz = P_GetFFloorBottomZAt(rover, frontsector->soundorg.x, frontsector->soundorg.y);
|
||||
if (planecenterz <= ceilingcenterz
|
||||
&& planecenterz >= floorcenterz
|
||||
&& ((viewz < heightcheck && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES)))
|
||||
|| (viewz > heightcheck && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||
&& ((viewz < heightcheck && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES)))
|
||||
|| (viewz > heightcheck && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES))))
|
||||
{
|
||||
light = R_GetPlaneLight(frontsector, planecenterz,
|
||||
viewz < heightcheck);
|
||||
|
@ -969,8 +969,8 @@ static void R_Subsector(size_t num)
|
|||
planecenterz = P_GetFFloorTopZAt(rover, frontsector->soundorg.x, frontsector->soundorg.y);
|
||||
if (planecenterz >= floorcenterz
|
||||
&& planecenterz <= ceilingcenterz
|
||||
&& ((viewz > heightcheck && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES)))
|
||||
|| (viewz < heightcheck && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||
&& ((viewz > heightcheck && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES)))
|
||||
|| (viewz < heightcheck && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES))))
|
||||
{
|
||||
light = R_GetPlaneLight(frontsector, planecenterz, viewz < heightcheck);
|
||||
|
||||
|
@ -1106,11 +1106,11 @@ void R_Prep3DFloors(sector_t *sector)
|
|||
count = 1;
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if ((rover->flags & FF_EXISTS) && (!(rover->flags & FF_NOSHADE)
|
||||
|| (rover->flags & FF_CUTLEVEL) || (rover->flags & FF_CUTSPRITES)))
|
||||
if ((rover->fofflags & FOF_EXISTS) && (!(rover->fofflags & FOF_NOSHADE)
|
||||
|| (rover->fofflags & FOF_CUTLEVEL) || (rover->fofflags & FOF_CUTSPRITES)))
|
||||
{
|
||||
count++;
|
||||
if (rover->flags & FF_DOUBLESHADOW)
|
||||
if (rover->fofflags & FOF_DOUBLESHADOW)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
@ -1141,8 +1141,8 @@ void R_Prep3DFloors(sector_t *sector)
|
|||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
rover->lastlight = 0;
|
||||
if (!(rover->flags & FF_EXISTS) || (rover->flags & FF_NOSHADE
|
||||
&& !(rover->flags & FF_CUTLEVEL) && !(rover->flags & FF_CUTSPRITES)))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || (rover->fofflags & FOF_NOSHADE
|
||||
&& !(rover->fofflags & FOF_CUTLEVEL) && !(rover->fofflags & FOF_CUTSPRITES)))
|
||||
continue;
|
||||
|
||||
heighttest = P_GetFFloorTopZAt(rover, sector->soundorg.x, sector->soundorg.y);
|
||||
|
@ -1154,7 +1154,7 @@ void R_Prep3DFloors(sector_t *sector)
|
|||
bestslope = *rover->t_slope;
|
||||
continue;
|
||||
}
|
||||
if (rover->flags & FF_DOUBLESHADOW) {
|
||||
if (rover->fofflags & FOF_DOUBLESHADOW) {
|
||||
heighttest = P_GetFFloorBottomZAt(rover, sector->soundorg.x, sector->soundorg.y);
|
||||
|
||||
if (heighttest > bestheight
|
||||
|
@ -1175,16 +1175,16 @@ void R_Prep3DFloors(sector_t *sector)
|
|||
|
||||
sector->lightlist[i].height = maxheight = bestheight;
|
||||
sector->lightlist[i].caster = best;
|
||||
sector->lightlist[i].flags = best->flags;
|
||||
sector->lightlist[i].flags = best->fofflags;
|
||||
sector->lightlist[i].slope = bestslope;
|
||||
sec = §ors[best->secnum];
|
||||
|
||||
if (best->flags & FF_NOSHADE)
|
||||
if (best->fofflags & FOF_NOSHADE)
|
||||
{
|
||||
sector->lightlist[i].lightlevel = sector->lightlist[i-1].lightlevel;
|
||||
sector->lightlist[i].extra_colormap = sector->lightlist[i-1].extra_colormap;
|
||||
}
|
||||
else if (best->flags & FF_COLORMAPONLY)
|
||||
else if (best->fofflags & FOF_COLORMAPONLY)
|
||||
{
|
||||
sector->lightlist[i].lightlevel = sector->lightlist[i-1].lightlevel;
|
||||
sector->lightlist[i].extra_colormap = &sec->extra_colormap;
|
||||
|
@ -1195,7 +1195,7 @@ void R_Prep3DFloors(sector_t *sector)
|
|||
sector->lightlist[i].extra_colormap = &sec->extra_colormap;
|
||||
}
|
||||
|
||||
if (best->flags & FF_DOUBLESHADOW)
|
||||
if (best->fofflags & FOF_DOUBLESHADOW)
|
||||
{
|
||||
heighttest = P_GetFFloorBottomZAt(best, sector->soundorg.x, sector->soundorg.y);
|
||||
if (bestheight == heighttest) ///TODO: do this in a more efficient way -Red
|
||||
|
|
80
src/r_defs.h
80
src/r_defs.h
|
@ -115,41 +115,41 @@ typedef struct
|
|||
*/
|
||||
typedef enum
|
||||
{
|
||||
FF_EXISTS = 0x1, ///< Always set, to check for validity.
|
||||
FF_BLOCKPLAYER = 0x2, ///< Solid to player, but nothing else
|
||||
FF_BLOCKOTHERS = 0x4, ///< Solid to everything but player
|
||||
FF_SOLID = 0x6, ///< Clips things.
|
||||
FF_RENDERSIDES = 0x8, ///< Renders the sides.
|
||||
FF_RENDERPLANES = 0x10, ///< Renders the floor/ceiling.
|
||||
FF_RENDERALL = 0x18, ///< Renders everything.
|
||||
FF_SWIMMABLE = 0x20, ///< Is a water block.
|
||||
FF_NOSHADE = 0x40, ///< Messes with the lighting?
|
||||
FF_CUTSOLIDS = 0x80, ///< Cuts out hidden solid pixels.
|
||||
FF_CUTEXTRA = 0x100, ///< Cuts out hidden translucent pixels.
|
||||
FF_CUTLEVEL = 0x180, ///< Cuts out all hidden pixels.
|
||||
FF_CUTSPRITES = 0x200, ///< Final step in making 3D water.
|
||||
FF_BOTHPLANES = 0x400, ///< Render inside and outside planes.
|
||||
FF_EXTRA = 0x800, ///< Gets cut by ::FF_CUTEXTRA.
|
||||
FF_TRANSLUCENT = 0x1000, ///< See through!
|
||||
FF_FOG = 0x2000, ///< Fog "brush."
|
||||
FF_INVERTPLANES = 0x4000, ///< Only render inside planes.
|
||||
FF_ALLSIDES = 0x8000, ///< Render inside and outside sides.
|
||||
FF_INVERTSIDES = 0x10000, ///< Only render inside sides.
|
||||
FF_DOUBLESHADOW = 0x20000, ///< Make two lightlist entries to reset light?
|
||||
FF_FLOATBOB = 0x40000, ///< Floats on water and bobs if you step on it.
|
||||
FF_NORETURN = 0x80000, ///< Used with ::FF_CRUMBLE. Will not return to its original position after falling.
|
||||
FF_CRUMBLE = 0x100000, ///< Falls 2 seconds after being stepped on, and randomly brings all touching crumbling 3dfloors down with it, providing their master sectors share the same tag (allows crumble platforms above or below, to also exist).
|
||||
FF_GOOWATER = 0x200000, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
|
||||
FF_MARIO = 0x400000, ///< Acts like a question block when hit from underneath. Goodie spawned at top is determined by master sector.
|
||||
FF_BUSTUP = 0x800000, ///< You can spin through/punch this block and it will crumble!
|
||||
FF_QUICKSAND = 0x1000000, ///< Quicksand!
|
||||
FF_PLATFORM = 0x2000000, ///< You can jump up through this to the top.
|
||||
FF_REVERSEPLATFORM = 0x4000000, ///< A fall-through floor in normal gravity, a platform in reverse gravity.
|
||||
FF_INTANGIBLEFLATS = 0x6000000, ///< Both flats are intangible, but the sides are still solid.
|
||||
FF_RIPPLE = 0x8000000, ///< Ripple the flats
|
||||
FF_COLORMAPONLY = 0x10000000, ///< Only copy the colormap, not the lightlevel
|
||||
FF_BOUNCY = 0x20000000, ///< Bounces players
|
||||
FF_SPLAT = 0x40000000, ///< Use splat flat renderer (treat cyan pixels as invisible)
|
||||
FOF_EXISTS = 0x1, ///< Always set, to check for validity.
|
||||
FOF_BLOCKPLAYER = 0x2, ///< Solid to player, but nothing else
|
||||
FOF_BLOCKOTHERS = 0x4, ///< Solid to everything but player
|
||||
FOF_SOLID = 0x6, ///< Clips things.
|
||||
FOF_RENDERSIDES = 0x8, ///< Renders the sides.
|
||||
FOF_RENDERPLANES = 0x10, ///< Renders the floor/ceiling.
|
||||
FOF_RENDERALL = 0x18, ///< Renders everything.
|
||||
FOF_SWIMMABLE = 0x20, ///< Is a water block.
|
||||
FOF_NOSHADE = 0x40, ///< Messes with the lighting?
|
||||
FOF_CUTSOLIDS = 0x80, ///< Cuts out hidden solid pixels.
|
||||
FOF_CUTEXTRA = 0x100, ///< Cuts out hidden translucent pixels.
|
||||
FOF_CUTLEVEL = 0x180, ///< Cuts out all hidden pixels.
|
||||
FOF_CUTSPRITES = 0x200, ///< Final step in making 3D water.
|
||||
FOF_BOTHPLANES = 0x400, ///< Render inside and outside planes.
|
||||
FOF_EXTRA = 0x800, ///< Gets cut by ::FOF_CUTEXTRA.
|
||||
FOF_TRANSLUCENT = 0x1000, ///< See through!
|
||||
FOF_FOG = 0x2000, ///< Fog "brush."
|
||||
FOF_INVERTPLANES = 0x4000, ///< Only render inside planes.
|
||||
FOF_ALLSIDES = 0x8000, ///< Render inside and outside sides.
|
||||
FOF_INVERTSIDES = 0x10000, ///< Only render inside sides.
|
||||
FOF_DOUBLESHADOW = 0x20000, ///< Make two lightlist entries to reset light?
|
||||
FOF_FLOATBOB = 0x40000, ///< Floats on water and bobs if you step on it.
|
||||
FOF_NORETURN = 0x80000, ///< Used with ::FOF_CRUMBLE. Will not return to its original position after falling.
|
||||
FOF_CRUMBLE = 0x100000, ///< Falls 2 seconds after being stepped on, and randomly brings all touching crumbling 3dfloors down with it, providing their master sectors share the same tag (allows crumble platforms above or below, to also exist).
|
||||
FOF_GOOWATER = 0x200000, ///< Used with ::FOF_SWIMMABLE. Makes thick bouncey goop.
|
||||
FOF_MARIO = 0x400000, ///< Acts like a question block when hit from underneath. Goodie spawned at top is determined by master sector.
|
||||
FOF_BUSTUP = 0x800000, ///< You can spin through/punch this block and it will crumble!
|
||||
FOF_QUICKSAND = 0x1000000, ///< Quicksand!
|
||||
FOF_PLATFORM = 0x2000000, ///< You can jump up through this to the top.
|
||||
FOF_REVERSEPLATFORM = 0x4000000, ///< A fall-through floor in normal gravity, a platform in reverse gravity.
|
||||
FOF_INTANGIBLEFLATS = 0x6000000, ///< Both flats are intangible, but the sides are still solid.
|
||||
FOF_RIPPLE = 0x8000000, ///< Ripple the flats
|
||||
FOF_COLORMAPONLY = 0x10000000, ///< Only copy the colormap, not the lightlevel
|
||||
FOF_BOUNCY = 0x20000000, ///< Bounces players
|
||||
FOF_SPLAT = 0x40000000, ///< Use splat flat renderer (treat cyan pixels as invisible)
|
||||
} ffloortype_e;
|
||||
|
||||
typedef enum
|
||||
|
@ -228,7 +228,7 @@ typedef struct ffloor_s
|
|||
struct pslope_s **b_slope;
|
||||
|
||||
size_t secnum;
|
||||
ffloortype_e flags;
|
||||
ffloortype_e fofflags;
|
||||
struct line_s *master;
|
||||
|
||||
struct sector_s *target;
|
||||
|
@ -241,16 +241,16 @@ typedef struct ffloor_s
|
|||
UINT8 blend; // blendmode
|
||||
tic_t norender; // for culling
|
||||
|
||||
// Only relevant for FF_BUSTUP
|
||||
// Only relevant for FOF_BUSTUP
|
||||
ffloorbustflags_e bustflags;
|
||||
UINT8 busttype;
|
||||
INT16 busttag;
|
||||
|
||||
// Only relevant for FF_QUICKSAND
|
||||
// Only relevant for FOF_QUICKSAND
|
||||
fixed_t sinkspeed;
|
||||
fixed_t friction;
|
||||
|
||||
// Only relevant for FF_BOUNCY
|
||||
// Only relevant for FOF_BOUNCY
|
||||
fixed_t bouncestrength;
|
||||
|
||||
// these are saved for netgames, so do not let Lua touch these!
|
||||
|
@ -271,7 +271,7 @@ typedef struct lightlist_s
|
|||
extracolormap_t **extra_colormap; // pointer-to-a-pointer, so we can react to colormap changes
|
||||
INT32 flags;
|
||||
ffloor_t *caster;
|
||||
struct pslope_s *slope; // FF_DOUBLESHADOW makes me have to store this pointer here. Bluh bluh.
|
||||
struct pslope_s *slope; // FOF_DOUBLESHADOW makes me have to store this pointer here. Bluh bluh.
|
||||
} lightlist_t;
|
||||
|
||||
|
||||
|
|
|
@ -2128,7 +2128,7 @@ void R_DrawColumnShadowed_8(void)
|
|||
{
|
||||
// If the height of the light is above the column, get the colormap
|
||||
// anyway because the lighting of the top should be affected.
|
||||
solid = dc_lightlist[i].flags & FF_CUTSOLIDS;
|
||||
solid = dc_lightlist[i].flags & FOF_CUTSOLIDS;
|
||||
|
||||
height = dc_lightlist[i].height >> LIGHTSCALESHIFT;
|
||||
if (solid)
|
||||
|
|
|
@ -836,13 +836,13 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
// Don't draw planes that shouldn't be drawn.
|
||||
for (rover = pl->ffloor->target->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if ((pl->ffloor->flags & FF_CUTEXTRA) && (rover->flags & FF_EXTRA))
|
||||
if ((pl->ffloor->fofflags & FOF_CUTEXTRA) && (rover->fofflags & FOF_EXTRA))
|
||||
{
|
||||
if (pl->ffloor->flags & FF_EXTRA)
|
||||
if (pl->ffloor->fofflags & FOF_EXTRA)
|
||||
{
|
||||
// The plane is from an extra 3D floor... Check the flags so
|
||||
// there are no undesired cuts.
|
||||
if (((pl->ffloor->flags & (FF_FOG|FF_SWIMMABLE)) == (rover->flags & (FF_FOG|FF_SWIMMABLE)))
|
||||
if (((pl->ffloor->fofflags & (FOF_FOG|FOF_SWIMMABLE)) == (rover->fofflags & (FOF_FOG|FOF_SWIMMABLE)))
|
||||
&& pl->height < *rover->topheight
|
||||
&& pl->height > *rover->bottomheight)
|
||||
return;
|
||||
|
@ -850,9 +850,9 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
}
|
||||
}
|
||||
|
||||
if (pl->ffloor->flags & FF_TRANSLUCENT)
|
||||
if (pl->ffloor->fofflags & FOF_TRANSLUCENT)
|
||||
{
|
||||
spanfunctype = (pl->ffloor->flags & FF_SPLAT) ? SPANDRAWFUNC_TRANSSPLAT : SPANDRAWFUNC_TRANS;
|
||||
spanfunctype = (pl->ffloor->fofflags & FOF_SPLAT) ? SPANDRAWFUNC_TRANSSPLAT : SPANDRAWFUNC_TRANS;
|
||||
|
||||
// Hacked up support for alpha value in software mode Tails 09-24-2002
|
||||
// ...unhacked by toaster 04-01-2021, re-hacked a little by sphere 19-11-2021
|
||||
|
@ -871,14 +871,14 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
else
|
||||
light = LIGHTLEVELS-1;
|
||||
}
|
||||
else if (pl->ffloor->flags & FF_FOG)
|
||||
else if (pl->ffloor->fofflags & FOF_FOG)
|
||||
{
|
||||
spanfunctype = SPANDRAWFUNC_FOG;
|
||||
light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
||||
}
|
||||
else light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
||||
|
||||
if (pl->ffloor->flags & FF_RIPPLE)
|
||||
if (pl->ffloor->fofflags & FOF_RIPPLE)
|
||||
{
|
||||
INT32 top, bottom;
|
||||
|
||||
|
|
98
src/r_segs.c
98
src/r_segs.c
|
@ -244,7 +244,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
rlight->flags = light->flags;
|
||||
|
||||
if ((colfunc != colfuncs[COLDRAWFUNC_FUZZY])
|
||||
|| (rlight->flags & FF_FOG)
|
||||
|| (rlight->flags & FOF_FOG)
|
||||
|| (rlight->extra_colormap && (rlight->extra_colormap->flags & CMF_FOG)))
|
||||
lightnum = (rlight->lightlevel >> LIGHTSEGSHIFT);
|
||||
else
|
||||
|
@ -387,7 +387,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
{
|
||||
rlight = &dc_lightlist[i];
|
||||
|
||||
if ((rlight->flags & FF_NOSHADE))
|
||||
if ((rlight->flags & FOF_NOSHADE))
|
||||
continue;
|
||||
|
||||
if (rlight->lightnum < 0)
|
||||
|
@ -547,7 +547,7 @@ static boolean R_IsFFloorTranslucent(visffloor_t *pfloor)
|
|||
|
||||
// Polyobjects have no ffloors, and they're handled in the conditional above.
|
||||
if (pfloor->ffloor != NULL)
|
||||
return (pfloor->ffloor->flags & (FF_TRANSLUCENT|FF_FOG));
|
||||
return (pfloor->ffloor->fofflags & (FOF_TRANSLUCENT|FOF_FOG));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -602,7 +602,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
texnum = R_GetTextureNum(sides[newline->sidenum[0]].midtexture);
|
||||
}
|
||||
|
||||
if (pfloor->flags & FF_TRANSLUCENT)
|
||||
if (pfloor->fofflags & FOF_TRANSLUCENT)
|
||||
{
|
||||
boolean fuzzy = true;
|
||||
|
||||
|
@ -621,7 +621,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
if (fuzzy)
|
||||
colfunc = colfuncs[COLDRAWFUNC_FUZZY];
|
||||
}
|
||||
else if (pfloor->flags & FF_FOG)
|
||||
else if (pfloor->fofflags & FOF_FOG)
|
||||
colfunc = colfuncs[COLDRAWFUNC_FOG];
|
||||
|
||||
range = max(ds->x2-ds->x1, 1);
|
||||
|
@ -684,7 +684,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
else rlight->heightstep = CLAMPMIN;
|
||||
rlight->heightstep = (rlight->heightstep-rlight->height)/(range);
|
||||
rlight->flags = light->flags;
|
||||
if (light->flags & FF_CUTLEVEL)
|
||||
if (light->flags & FOF_CUTLEVEL)
|
||||
{
|
||||
SLOPEPARAMS(*light->caster->b_slope, leftheight, rightheight, *light->caster->bottomheight)
|
||||
#undef SLOPEPARAMS
|
||||
|
@ -708,12 +708,12 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
rlight->extra_colormap = *light->extra_colormap;
|
||||
|
||||
// Check if the current light effects the colormap/lightlevel
|
||||
if (pfloor->flags & FF_FOG)
|
||||
if (pfloor->fofflags & FOF_FOG)
|
||||
rlight->lightnum = (pfloor->master->frontsector->lightlevel >> LIGHTSEGSHIFT);
|
||||
else
|
||||
rlight->lightnum = (rlight->lightlevel >> LIGHTSEGSHIFT);
|
||||
|
||||
if (pfloor->flags & FF_FOG || rlight->flags & FF_FOG || (rlight->extra_colormap && (rlight->extra_colormap->flags & CMF_FOG)))
|
||||
if (pfloor->fofflags & FOF_FOG || rlight->flags & FOF_FOG || (rlight->extra_colormap && (rlight->extra_colormap->flags & CMF_FOG)))
|
||||
;
|
||||
else if (curline->v1->y == curline->v2->y)
|
||||
rlight->lightnum--;
|
||||
|
@ -730,7 +730,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
// Get correct light level!
|
||||
if ((frontsector->extra_colormap && (frontsector->extra_colormap->flags & CMF_FOG)))
|
||||
lightnum = (frontsector->lightlevel >> LIGHTSEGSHIFT);
|
||||
else if (pfloor->flags & FF_FOG)
|
||||
else if (pfloor->fofflags & FOF_FOG)
|
||||
lightnum = (pfloor->master->frontsector->lightlevel >> LIGHTSEGSHIFT);
|
||||
else if (colfunc == colfuncs[COLDRAWFUNC_FUZZY])
|
||||
lightnum = LIGHTLEVELS-1;
|
||||
|
@ -738,7 +738,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
lightnum = R_FakeFlat(frontsector, &tempsec, &templight, &templight, false)
|
||||
->lightlevel >> LIGHTSEGSHIFT;
|
||||
|
||||
if (pfloor->flags & FF_FOG || (frontsector->extra_colormap && (frontsector->extra_colormap->flags & CMF_FOG)));
|
||||
if (pfloor->fofflags & FOF_FOG || (frontsector->extra_colormap && (frontsector->extra_colormap->flags & CMF_FOG)));
|
||||
else if (curline->v1->y == curline->v2->y)
|
||||
lightnum--;
|
||||
else if (curline->v1->x == curline->v2->x)
|
||||
|
@ -885,7 +885,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
{
|
||||
rlight = &dc_lightlist[i];
|
||||
rlight->height += rlight->heightstep;
|
||||
if (rlight->flags & FF_CUTLEVEL)
|
||||
if (rlight->flags & FOF_CUTLEVEL)
|
||||
rlight->botheight += rlight->botheightstep;
|
||||
}
|
||||
}
|
||||
|
@ -912,7 +912,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
{
|
||||
// Check if the current light effects the colormap/lightlevel
|
||||
rlight = &dc_lightlist[i];
|
||||
lighteffect = !(dc_lightlist[i].flags & FF_NOSHADE);
|
||||
lighteffect = !(dc_lightlist[i].flags & FOF_NOSHADE);
|
||||
if (lighteffect)
|
||||
{
|
||||
lightnum = rlight->lightnum;
|
||||
|
@ -929,7 +929,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE-1;
|
||||
|
||||
if (pfloor->flags & FF_FOG)
|
||||
if (pfloor->fofflags & FOF_FOG)
|
||||
{
|
||||
if (pfloor->master->frontsector->extra_colormap)
|
||||
rlight->rcolormap = pfloor->master->frontsector->extra_colormap->colormap + (xwalllights[pindex] - colormaps);
|
||||
|
@ -948,15 +948,15 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
solid = 0; // don't carry over solid-cutting flag from the previous light
|
||||
|
||||
// Check if the current light can cut the current 3D floor.
|
||||
if (rlight->flags & FF_CUTSOLIDS && !(pfloor->flags & FF_EXTRA))
|
||||
if (rlight->flags & FOF_CUTSOLIDS && !(pfloor->fofflags & FOF_EXTRA))
|
||||
solid = 1;
|
||||
else if (rlight->flags & FF_CUTEXTRA && pfloor->flags & FF_EXTRA)
|
||||
else if (rlight->flags & FOF_CUTEXTRA && pfloor->fofflags & FOF_EXTRA)
|
||||
{
|
||||
if (rlight->flags & FF_EXTRA)
|
||||
if (rlight->flags & FOF_EXTRA)
|
||||
{
|
||||
// The light is from an extra 3D floor... Check the flags so
|
||||
// there are no undesired cuts.
|
||||
if ((rlight->flags & (FF_FOG|FF_SWIMMABLE)) == (pfloor->flags & (FF_FOG|FF_SWIMMABLE)))
|
||||
if ((rlight->flags & (FOF_FOG|FOF_SWIMMABLE)) == (pfloor->fofflags & (FOF_FOG|FOF_SWIMMABLE)))
|
||||
solid = 1;
|
||||
}
|
||||
else
|
||||
|
@ -993,7 +993,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
{
|
||||
rlight = &dc_lightlist[i];
|
||||
rlight->height += rlight->heightstep;
|
||||
if (rlight->flags & FF_CUTLEVEL)
|
||||
if (rlight->flags & FOF_CUTLEVEL)
|
||||
rlight->botheight += rlight->botheightstep;
|
||||
}
|
||||
continue;
|
||||
|
@ -1024,7 +1024,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
|
||||
dc_colormap = walllights[pindex];
|
||||
|
||||
if (pfloor->flags & FF_FOG && pfloor->master->frontsector->extra_colormap)
|
||||
if (pfloor->fofflags & FOF_FOG && pfloor->master->frontsector->extra_colormap)
|
||||
dc_colormap = pfloor->master->frontsector->extra_colormap->colormap + (dc_colormap - colormaps);
|
||||
else if (frontsector->extra_colormap)
|
||||
dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps);
|
||||
|
@ -1466,7 +1466,7 @@ static void R_RenderSegLoop (void)
|
|||
for (i = 0; i < dc_numlights; i++)
|
||||
{
|
||||
dc_lightlist[i].height += dc_lightlist[i].heightstep;
|
||||
if (dc_lightlist[i].flags & FF_CUTSOLIDS)
|
||||
if (dc_lightlist[i].flags & FOF_CUTSOLIDS)
|
||||
dc_lightlist[i].botheight += dc_lightlist[i].botheightstep;
|
||||
}
|
||||
}
|
||||
|
@ -2052,9 +2052,9 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
i = 0;
|
||||
for (rover = backsector->ffloors; rover && i < MAXFFLOORS; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_RENDERSIDES) || !(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
if (!(rover->flags & FF_ALLSIDES) && rover->flags & FF_INVERTSIDES)
|
||||
if (!(rover->fofflags & FOF_ALLSIDES) && rover->fofflags & FOF_INVERTSIDES)
|
||||
continue;
|
||||
|
||||
if (rover->norender == leveltime)
|
||||
|
@ -2071,23 +2071,23 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
if (r2->master == rover->master) // Skip if same control line.
|
||||
break;
|
||||
|
||||
if (!(r2->flags & FF_EXISTS) || !(r2->flags & FF_RENDERSIDES))
|
||||
if (!(r2->fofflags & FOF_EXISTS) || !(r2->fofflags & FOF_RENDERSIDES))
|
||||
continue;
|
||||
|
||||
if (r2->norender == leveltime)
|
||||
continue;
|
||||
|
||||
if (rover->flags & FF_EXTRA)
|
||||
if (rover->fofflags & FOF_EXTRA)
|
||||
{
|
||||
if (!(r2->flags & FF_CUTEXTRA))
|
||||
if (!(r2->fofflags & FOF_CUTEXTRA))
|
||||
continue;
|
||||
|
||||
if (r2->flags & FF_EXTRA && (r2->flags & (FF_TRANSLUCENT|FF_FOG)) != (rover->flags & (FF_TRANSLUCENT|FF_FOG)))
|
||||
if (r2->fofflags & FOF_EXTRA && (r2->fofflags & (FOF_TRANSLUCENT|FOF_FOG)) != (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG)))
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(r2->flags & FF_CUTSOLIDS))
|
||||
if (!(r2->fofflags & FOF_CUTSOLIDS))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2110,9 +2110,9 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
|
||||
for (rover = frontsector->ffloors; rover && i < MAXFFLOORS; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_RENDERSIDES) || !(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
if (!(rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES))
|
||||
if (!(rover->fofflags & FOF_ALLSIDES || rover->fofflags & FOF_INVERTSIDES))
|
||||
continue;
|
||||
|
||||
if (rover->norender == leveltime)
|
||||
|
@ -2129,23 +2129,23 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
if (r2->master == rover->master) // Skip if same control line.
|
||||
break;
|
||||
|
||||
if (!(r2->flags & FF_EXISTS) || !(r2->flags & FF_RENDERSIDES))
|
||||
if (!(r2->fofflags & FOF_EXISTS) || !(r2->fofflags & FOF_RENDERSIDES))
|
||||
continue;
|
||||
|
||||
if (r2->norender == leveltime)
|
||||
continue;
|
||||
|
||||
if (rover->flags & FF_EXTRA)
|
||||
if (rover->fofflags & FOF_EXTRA)
|
||||
{
|
||||
if (!(r2->flags & FF_CUTEXTRA))
|
||||
if (!(r2->fofflags & FOF_CUTEXTRA))
|
||||
continue;
|
||||
|
||||
if (r2->flags & FF_EXTRA && (r2->flags & (FF_TRANSLUCENT|FF_FOG)) != (rover->flags & (FF_TRANSLUCENT|FF_FOG)))
|
||||
if (r2->fofflags & FOF_EXTRA && (r2->fofflags & (FOF_TRANSLUCENT|FOF_FOG)) != (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG)))
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(r2->flags & FF_CUTSOLIDS))
|
||||
if (!(r2->fofflags & FOF_CUTSOLIDS))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2170,9 +2170,9 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
{
|
||||
for (rover = backsector->ffloors, i = 0; rover && i < MAXFFLOORS; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_RENDERSIDES) || !(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
if (!(rover->flags & FF_ALLSIDES) && rover->flags & FF_INVERTSIDES)
|
||||
if (!(rover->fofflags & FOF_ALLSIDES) && rover->fofflags & FOF_INVERTSIDES)
|
||||
continue;
|
||||
if (rover->norender == leveltime)
|
||||
continue;
|
||||
|
@ -2192,9 +2192,9 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
{
|
||||
for (rover = frontsector->ffloors, i = 0; rover && i < MAXFFLOORS; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS))
|
||||
if (!(rover->fofflags & FOF_RENDERSIDES) || !(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
if (!(rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES))
|
||||
if (!(rover->fofflags & FOF_ALLSIDES || rover->fofflags & FOF_INVERTSIDES))
|
||||
continue;
|
||||
if (rover->norender == leveltime)
|
||||
continue;
|
||||
|
@ -2416,7 +2416,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
rlight->heightstep = (rlight->heightstep-rlight->height)/(range);
|
||||
rlight->flags = light->flags;
|
||||
|
||||
if (light->caster && light->caster->flags & FF_CUTSOLIDS)
|
||||
if (light->caster && light->caster->fofflags & FOF_CUTSOLIDS)
|
||||
{
|
||||
leftheight = P_GetFFloorBottomZAt(light->caster, segleft.x, segleft.y);
|
||||
rightheight = P_GetFFloorBottomZAt(light->caster, segright.x, segright.y);
|
||||
|
@ -2503,7 +2503,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
{
|
||||
for (rover = backsector->ffloors; rover && i < MAXFFLOORS; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERPLANES))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES))
|
||||
continue;
|
||||
if (rover->norender == leveltime)
|
||||
continue;
|
||||
|
@ -2518,8 +2518,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
|
||||
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
||||
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
||||
((viewz < planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||
(viewz > planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||
((viewz < planevistest && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) ||
|
||||
(viewz > planevistest && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES))))
|
||||
{
|
||||
//ffloor[i].slope = *rover->b_slope;
|
||||
ffloor[i].b_pos = roverleft;
|
||||
|
@ -2541,8 +2541,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
|
||||
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
||||
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
||||
((viewz > planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||
(viewz < planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||
((viewz > planevistest && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) ||
|
||||
(viewz < planevistest && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES))))
|
||||
{
|
||||
//ffloor[i].slope = *rover->t_slope;
|
||||
ffloor[i].b_pos = roverleft;
|
||||
|
@ -2560,7 +2560,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
{
|
||||
for (rover = frontsector->ffloors; rover && i < MAXFFLOORS; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERPLANES))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES))
|
||||
continue;
|
||||
if (rover->norender == leveltime)
|
||||
continue;
|
||||
|
@ -2575,8 +2575,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
|
||||
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
||||
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
||||
((viewz < planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||
(viewz > planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||
((viewz < planevistest && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) ||
|
||||
(viewz > planevistest && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES))))
|
||||
{
|
||||
//ffloor[i].slope = *rover->b_slope;
|
||||
ffloor[i].b_pos = roverleft;
|
||||
|
@ -2598,8 +2598,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
|
||||
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
||||
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
||||
((viewz > planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||
(viewz < planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||
((viewz > planevistest && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) ||
|
||||
(viewz < planevistest && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES))))
|
||||
{
|
||||
//ffloor[i].slope = *rover->t_slope;
|
||||
ffloor[i].b_pos = roverleft;
|
||||
|
|
|
@ -1055,7 +1055,7 @@ static void R_SplitSprite(vissprite_t *sprite)
|
|||
{
|
||||
fixed_t testheight;
|
||||
|
||||
if (!(sector->lightlist[i].caster->flags & FF_CUTSPRITES))
|
||||
if (!(sector->lightlist[i].caster->fofflags & FOF_CUTSPRITES))
|
||||
continue;
|
||||
|
||||
testheight = P_GetLightZAt(§or->lightlist[i], sprite->gx, sprite->gy);
|
||||
|
@ -1096,7 +1096,7 @@ static void R_SplitSprite(vissprite_t *sprite)
|
|||
newsprite->szt -= 8;
|
||||
|
||||
newsprite->cut |= SC_TOP;
|
||||
if (!(sector->lightlist[i].caster->flags & FF_NOSHADE))
|
||||
if (!(sector->lightlist[i].caster->fofflags & FOF_NOSHADE))
|
||||
{
|
||||
lightnum = (*sector->lightlist[i].lightlevel >> LIGHTSEGSHIFT);
|
||||
|
||||
|
@ -1162,7 +1162,7 @@ fixed_t R_GetShadowZ(mobj_t *thing, pslope_t **shadowslope)
|
|||
if (sector->ffloors)
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERPLANES) || (rover->alpha < 90 && !(rover->flags & FF_SWIMMABLE)))
|
||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES) || (rover->alpha < 90 && !(rover->fofflags & FOF_SWIMMABLE)))
|
||||
continue;
|
||||
|
||||
z = isflipped ? P_GetFFloorBottomZAt(rover, thing->x, thing->y) : P_GetFFloorTopZAt(rover, thing->x, thing->y);
|
||||
|
|
Loading…
Reference in a new issue