mirror of
https://github.com/ZDoom/zdbsp.git
synced 2024-11-22 11:51:19 +00:00
ZDBSP: Changed GetPolyExtents() limitter to count down instead of up.
SVN r1339 (trunk)
This commit is contained in:
parent
ba25ef01f6
commit
2bb9246cc3
1 changed files with 2 additions and 3 deletions
|
@ -404,7 +404,7 @@ bool FNodeBuilder::GetPolyExtents (int polynum, fixed_t bbox[4])
|
||||||
{
|
{
|
||||||
vertex_t start;
|
vertex_t start;
|
||||||
unsigned int vert;
|
unsigned int vert;
|
||||||
unsigned int count = 0;
|
unsigned int count = Segs.Size(); // to prevent endless loops. Stop when this reaches the number of segs.
|
||||||
|
|
||||||
vert = Segs[i].v1;
|
vert = Segs[i].v1;
|
||||||
|
|
||||||
|
@ -416,8 +416,7 @@ bool FNodeBuilder::GetPolyExtents (int polynum, fixed_t bbox[4])
|
||||||
AddSegToBBox (bbox, &Segs[i]);
|
AddSegToBBox (bbox, &Segs[i]);
|
||||||
vert = Segs[i].v2;
|
vert = Segs[i].v2;
|
||||||
i = Vertices[vert].segs;
|
i = Vertices[vert].segs;
|
||||||
count++; // to prevent endless loops. Stop when this reaches the number of segs.
|
} while (--count && i != DWORD_MAX && (Vertices[vert].x != start.x || Vertices[vert].y != start.y));
|
||||||
} while (i != DWORD_MAX && (Vertices[vert].x != start.x || Vertices[vert].y != start.y) && count < Segs.Size());
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue