- softpoly: fix normal walls not getting rendered for subsectors with poly objects in them

This commit is contained in:
Magnus Norddahl 2018-07-01 14:41:35 +02:00
parent 0a139e90fb
commit 6d6ee1281e

View file

@ -148,8 +148,6 @@ void RenderPolyScene::RenderSubsector(PolyRenderThread *thread, subsector_t *sub
sector_t *frontsector = sub->sector;
frontsector->MoreFlags |= SECMF_DRAWN;
bool mainBSP = sub->polys == nullptr;
if (sub->polys)
{
if (sub->BSP == nullptr || sub->BSP->bDirty)
@ -172,12 +170,8 @@ void RenderPolyScene::RenderSubsector(PolyRenderThread *thread, subsector_t *sub
{
RenderPolyNode(thread, &sub->BSP->Nodes.Last(), subsectorDepth, frontsector);
}
Render3DFloorPlane::RenderPlanes(thread, sub, CurrentViewpoint->StencilValue, subsectorDepth, thread->TranslucentObjects);
RenderPolyPlane::RenderPlanes(thread, sub, CurrentViewpoint->StencilValue, Cull.MaxCeilingHeight, Cull.MinFloorHeight, thread->SectorPortals, CurrentViewpoint->SectorPortalsStart);
}
else
{
PolyTransferHeights fakeflat(sub);
Render3DFloorPlane::RenderPlanes(thread, sub, CurrentViewpoint->StencilValue, subsectorDepth, thread->TranslucentObjects);
@ -191,10 +185,7 @@ void RenderPolyScene::RenderSubsector(PolyRenderThread *thread, subsector_t *sub
RenderLine(thread, sub, line, fakeflat.FrontSector, subsectorDepth);
}
}
}
if (mainBSP)
{
int subsectorIndex = sub->Index();
for (int i = ParticlesInSubsec[subsectorIndex]; i != NO_PARTICLE; i = Particles[i].snext)
{
@ -202,7 +193,6 @@ void RenderPolyScene::RenderSubsector(PolyRenderThread *thread, subsector_t *sub
thread->TranslucentObjects.push_back(thread->FrameMemory->NewObject<PolyTranslucentParticle>(particle, sub, subsectorDepth, CurrentViewpoint->StencilValue));
}
}
}
void RenderPolyScene::RenderPolyNode(PolyRenderThread *thread, void *node, uint32_t subsectorDepth, sector_t *frontsector)
{