- added the out-of-bounds vertex handler to the secondary triangulator as well.

If SW does this, triangulation must not be attempted as it will inevitably fail.
This commit is contained in:
Christoph Oelckers 2021-05-29 13:19:44 +02:00
parent db21313c96
commit 2b8a80c6ce

View file

@ -350,6 +350,12 @@ bool SectorGeometry::MakeVertices2(unsigned int secnum, int plane, const FVector
auto wallp = &wall[sline->startpoint];
vertexes[j].p = { wallp->x * (1 / 16.), wallp->y * (1 / -16.) };
if (fabs(vertexes[j].p.X) > 32768.f || fabs(vertexes[j].p.Y) > 32768.f)
{
// If we get here there's some fuckery going around with the coordinates. Let's better abort and wait for things to realign.
return true;
}
lines[j].backsector = nullptr;
lines[j].frontsector = sectorp;
lines[j].linenum = j;