Draw 3d floor sides

This commit is contained in:
Magnus Norddahl 2016-11-21 20:50:54 +01:00
commit 7af504df58
4 changed files with 92 additions and 47 deletions

View file

@ -140,7 +140,9 @@ void RenderPolyScene::RenderSubsector(subsector_t *sub)
{
seg_t *line = &sub->firstline[i];
if (line->sidedef == nullptr || !(line->sidedef->Flags & WALLF_POLYOBJ))
{
RenderLine(sub, line, frontsector, subsectorDepth);
}
}
bool mainBSP = ((unsigned int)(sub - subsectors) < (unsigned int)numsubsectors);
@ -206,6 +208,19 @@ void RenderPolyScene::RenderLine(subsector_t *sub, seg_t *line, sector_t *fronts
sub->flags |= SSECF_DRAWN;
}
// Render 3D floor sides
if (line->backsector && frontsector->e && line->backsector->e->XFloor.ffloors.Size())
{
for (unsigned int i = 0; i < line->backsector->e->XFloor.ffloors.Size(); i++)
{
F3DFloor *fakeFloor = line->backsector->e->XFloor.ffloors[i];
if (!(fakeFloor->flags & FF_EXISTS)) continue;
if (!(fakeFloor->flags & FF_RENDERPLANES)) continue;
if (!fakeFloor->model) continue;
RenderPolyWall::Render3DFloorLine(WorldToClip, line, frontsector, subsectorDepth, fakeFloor, SubsectorTranslucentWalls);
}
}
// Render wall, and update culling info if its an occlusion blocker
if (RenderPolyWall::RenderLine(WorldToClip, line, frontsector, subsectorDepth, SubsectorTranslucentWalls))
{