- changed the stencil cap drawer to only cover the area which is actually used by the portal.

This will now both exclude floor caps when only ceiling elements are used and everything outside the bounding box of active portal lines.
Hopefully this is enough to fix the issues with portal caps but of course it is not foolproof if someone just makes the right setup.
This commit is contained in:
Christoph Oelckers 2018-11-14 23:30:46 +01:00
commit 9f6091519f
7 changed files with 83 additions and 24 deletions

View file

@ -495,9 +495,9 @@ public:
auto &section = sections[i];
auto &work = triangles[i];
BoundingRect bounds = { 1e32, 1e32, -1e32, -1e32 };
BoundingRect loopBounds = { 1e32, 1e32, -1e32, -1e32 };
BoundingRect outermostBounds = { 1e32, 1e32, -1e32, -1e32 };
BoundingRect bounds(false);
BoundingRect loopBounds(false);
BoundingRect outermostBounds(false);
unsigned outermoststart = ~0u;
unsigned loopstart = 0;
bool ispolyorg = false;
@ -519,7 +519,7 @@ public:
outermoststart = loopstart;
loopstart = i + 1;
}
loopBounds = { 1e32, 1e32, -1e32, -1e32 };
loopBounds.setEmpty();
}
}
work.boundingLoopStart = outermoststart;
@ -716,7 +716,7 @@ public:
dest.subsectors.Set(&output.allSubsectors[numsubsectors], group.subsectors.Size());
dest.vertexindex = -1;
dest.vertexcount = 0;
dest.bounds = {1e32, 1e32, -1e32, -1e32};
dest.bounds.setEmpty();
numsegments += group.segments.Size();
if (output.firstSectionForSectorPtr[dest.sector->Index()] == -1)