mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +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
33
src/p_spec.c
33
src/p_spec.c
|
@ -7165,18 +7165,35 @@ static void P_AddFakeFloorsByLine2(size_t li)
|
|||
|
||||
// Solid
|
||||
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
|
||||
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
|
||||
else if (dtype == 3)
|
||||
{
|
||||
ffloorflags |= FF_CUTEXTRA|FF_CUTSPRITES|FF_EXTRA;
|
||||
|
||||
if (dopacity >= 255)
|
||||
ffloorflags |= 0;
|
||||
else
|
||||
ffloorflags |= FF_TRANSLUCENT;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Non-opaque
|
||||
if (dopacity < 255)
|
||||
{
|
||||
// Invisible
|
||||
if (dopacity == 0)
|
||||
{
|
||||
|
@ -7190,12 +7207,6 @@ static void P_AddFakeFloorsByLine2(size_t li)
|
|||
ffloorflags &= ~(FF_RENDERALL|FF_CUTEXTRA|FF_EXTRA|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTLEVEL);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ffloorflags |= FF_TRANSLUCENT|FF_CUTEXTRA|FF_EXTRA;
|
||||
ffloorflags &= ~FF_CUTLEVEL;
|
||||
}
|
||||
}
|
||||
|
||||
TAG_ITER_SECTORS(tag, s)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue