- 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:
parent
987c878a9a
commit
9098bc1a46
4 changed files with 12 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue