Delete invalid polyobjects from level array in PO_Init
This commit is contained in:
parent
b952e2d6fd
commit
51a069a1a5
1 changed files with 7 additions and 1 deletions
|
|
@ -396,13 +396,19 @@ void MapLoader::PO_Init (void)
|
|||
}
|
||||
|
||||
// check for a startspot without an anchor point
|
||||
for (auto &poly : Level->Polyobjects)
|
||||
for (int i = 0, size = Level->Polyobjects.Size(); i < size; ++i)
|
||||
{
|
||||
const auto& poly = Level->Polyobjects[i];
|
||||
|
||||
if (poly.OriginalPts.Size() == 0)
|
||||
{
|
||||
Printf (TEXTCOLOR_RED "PO_Init: StartSpot located without an Anchor point: %d\n", poly.tag);
|
||||
Level->Polyobjects.Delete(i--);
|
||||
--size;
|
||||
}
|
||||
}
|
||||
Level->Polyobjects.ShrinkToFit();
|
||||
|
||||
InitPolyBlockMap();
|
||||
|
||||
// [RH] Don't need the side lists anymore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue