vis: fix portal stack corruption in ClipStackWinding
Need to re-check numpoints before we add a split point. Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
186ca8863b
commit
ba88986462
|
|
@ -2,6 +2,7 @@ Unreleased
|
||||||
|
|
||||||
* qbsp: fixed surface edge corruption when using skip surfaces
|
* qbsp: fixed surface edge corruption when using skip surfaces
|
||||||
* qbsp: added "-noskip" option for troubleshooting skip related problems
|
* qbsp: added "-noskip" option for troubleshooting skip related problems
|
||||||
|
* vis: fix portal stack corruption in ClipStackWinding
|
||||||
* bsputil: added a "--check" option to check internal data consistency
|
* bsputil: added a "--check" option to check internal data consistency
|
||||||
|
|
||||||
2013-04-10 TyrUtils v0.7
|
2013-04-10 TyrUtils v0.7
|
||||||
|
|
|
||||||
|
|
@ -308,6 +308,13 @@ ClipStackWinding(winding_t *in, pstack_t *stack, plane_t *split)
|
||||||
if (sides[i + 1] == SIDE_ON || sides[i + 1] == sides[i])
|
if (sides[i + 1] == SIDE_ON || sides[i + 1] == sides[i])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (neww->numpoints == MAX_WINDING_FIXED) {
|
||||||
|
/* Can't clip, fall back to original */
|
||||||
|
FreeStackWinding(neww, stack);
|
||||||
|
c_noclip++;
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
// generate a split point
|
// generate a split point
|
||||||
p2 = in->points[(i + 1) % in->numpoints];
|
p2 = in->points[(i + 1) % in->numpoints];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue