mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 05:41:42 +00:00
Fix the generalized FOFs not culling other surfaces and refactor the code.
This commit is contained in:
parent
70207b9954
commit
2fe8f8235c
1 changed files with 30 additions and 19 deletions
49
src/p_spec.c
49
src/p_spec.c
|
@ -7165,35 +7165,46 @@ static void P_AddFakeFloorsByLine2(size_t li)
|
||||||
|
|
||||||
// Solid
|
// Solid
|
||||||
if (dtype == 1)
|
if (dtype == 1)
|
||||||
ffloorflags |= FF_CUTSOLIDS|FF_SOLID|FF_CUTLEVEL;
|
{
|
||||||
|
ffloorflags |= FF_SOLID;
|
||||||
|
if (dopacity >= 255)
|
||||||
|
ffloorflags |= FF_CUTLEVEL;
|
||||||
|
else
|
||||||
|
ffloorflags |= FF_TRANSLUCENT|FF_EXTRA|FF_CUTEXTRA;
|
||||||
|
}
|
||||||
// Water
|
// Water
|
||||||
else if (dtype == 2)
|
else if (dtype == 2)
|
||||||
ffloorflags |= FF_SWIMMABLE|FF_CUTEXTRA|FF_CUTSPRITES|FF_EXTRA|FF_RIPPLE;
|
{
|
||||||
|
ffloorflags |= FF_SWIMMABLE|FF_RIPPLE|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES;
|
||||||
|
if (dopacity >= 255)
|
||||||
|
ffloorflags |= 0;
|
||||||
|
else
|
||||||
|
ffloorflags |= FF_TRANSLUCENT;
|
||||||
|
}
|
||||||
// Intangible
|
// Intangible
|
||||||
else if (dtype == 3)
|
else if (dtype == 3)
|
||||||
|
{
|
||||||
ffloorflags |= FF_CUTEXTRA|FF_CUTSPRITES|FF_EXTRA;
|
ffloorflags |= FF_CUTEXTRA|FF_CUTSPRITES|FF_EXTRA;
|
||||||
|
|
||||||
|
if (dopacity >= 255)
|
||||||
|
ffloorflags |= 0;
|
||||||
|
else
|
||||||
|
ffloorflags |= FF_TRANSLUCENT;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Non-opaque
|
// Invisible
|
||||||
if (dopacity < 255)
|
if (dopacity == 0)
|
||||||
{
|
{
|
||||||
// Invisible
|
// True invisible
|
||||||
if (dopacity == 0)
|
if (ffloorflags & FF_NOSHADE)
|
||||||
{
|
ffloorflags &= ~(FF_RENDERALL|FF_CUTEXTRA|FF_CUTSPRITES|FF_EXTRA|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTLEVEL);
|
||||||
// True invisible
|
// Shadow block
|
||||||
if (ffloorflags & FF_NOSHADE)
|
|
||||||
ffloorflags &= ~(FF_RENDERALL|FF_CUTEXTRA|FF_CUTSPRITES|FF_EXTRA|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTLEVEL);
|
|
||||||
// Shadow block
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ffloorflags |= FF_CUTSPRITES;
|
|
||||||
ffloorflags &= ~(FF_RENDERALL|FF_CUTEXTRA|FF_EXTRA|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTLEVEL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ffloorflags |= FF_TRANSLUCENT|FF_CUTEXTRA|FF_EXTRA;
|
ffloorflags |= FF_CUTSPRITES;
|
||||||
ffloorflags &= ~FF_CUTLEVEL;
|
ffloorflags &= ~(FF_RENDERALL|FF_CUTEXTRA|FF_EXTRA|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTLEVEL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue