- Add polyobj support to softpoly

This commit is contained in:
Magnus Norddahl 2017-05-12 14:05:32 +02:00
parent 5736345e54
commit f7d1a2a574

View file

@ -70,6 +70,26 @@ void PolyCull::CullNode(void *node)
void PolyCull::CullSubsector(subsector_t *sub)
{
// Mark poly objects first
if (sub->polys)
{
if (sub->BSP == nullptr || sub->BSP->bDirty)
{
sub->BuildPolyBSP();
}
if (sub->BSP->Nodes.Size() == 0)
{
CullSubsector(&sub->BSP->Subsectors[0]);
}
else
{
CullNode(&sub->BSP->Nodes.Last());
}
return; // Hmm, seems a bit strange the subsector is then ignored. But that's what the sw renderer seems to be doing..
}
// Update sky heights for the scene
if (!FirstSkyHeight)
{