- Added a constant name for Skulltag's 128 flag for A_SpawnItemEx. For

compatibility ZDoom needs to define this name, too, even though it doesn't 
  use it.
- Fixed: The nodebuilder could hang on badly set up polyobjects. Now it aborts 
  when the loop iterates NumberOfSegs times.

SVN r1338 (trunk)
This commit is contained in:
Christoph Oelckers 2008-12-31 12:02:08 +00:00
commit 9098bc1a46
4 changed files with 12 additions and 3 deletions

View file

@ -440,6 +440,7 @@ bool FNodeBuilder::GetPolyExtents (int polynum, fixed_t bbox[4])
{
vertex_t start;
unsigned int vert;
unsigned int count = 0;
vert = Segs[i].v1;
@ -451,7 +452,8 @@ bool FNodeBuilder::GetPolyExtents (int polynum, fixed_t bbox[4])
AddSegToBBox (bbox, &Segs[i]);
vert = Segs[i].v2;
i = Vertices[vert].segs;
} while (i != DWORD_MAX && (Vertices[vert].x != start.x || Vertices[vert].y != start.y));
count++; // to prevent endless loops. Stop when this reaches the number of segs.
} while (i != DWORD_MAX && (Vertices[vert].x != start.x || Vertices[vert].y != start.y) && count < Segs.Size());
return true;
}