- don't let the triangulator choke on empty sectors.

This commit is contained in:
Christoph Oelckers 2021-05-23 17:19:01 +02:00
parent a63873d243
commit f212421547
2 changed files with 8 additions and 5 deletions

View file

@ -115,11 +115,6 @@ void FNodeBuilder::MakeSegsFromSides ()
{
int i, j;
if (Level.NumLines == 0)
{
I_Error ("Map is empty.\n");
}
for (i = 0; i < Level.NumLines; ++i)
{
if (Level.Lines[i].sidedef[0] != NULL)

View file

@ -456,6 +456,14 @@ bool SectorGeometry::MakeVertices2(unsigned int secnum, int plane, const FVector
nexti:;
}
if (lines.Size() == 0)
{
// nothing to generate.
auto& entry = data[secnum].planes[plane];
entry.vertices.Clear();
entry.texcoords.Clear();
return true;
}
FNodeBuilder::FLevel leveldata =