Skip to content
Snippets Groups Projects
Commit fbd4ce1d authored by Monster Iestyn's avatar Monster Iestyn
Browse files

optimised R_ExpandPlane too

parent efe9204f
No related branches found
Tags
No related merge requests found
...@@ -625,7 +625,7 @@ visplane_t *R_CheckPlane(visplane_t *pl, INT32 start, INT32 stop) ...@@ -625,7 +625,7 @@ visplane_t *R_CheckPlane(visplane_t *pl, INT32 start, INT32 stop)
// overlap. // overlap.
void R_ExpandPlane(visplane_t *pl, INT32 start, INT32 stop) void R_ExpandPlane(visplane_t *pl, INT32 start, INT32 stop)
{ {
INT32 unionl, unionh; // INT32 unionl, unionh;
// INT32 x; // INT32 x;
#ifdef POLYOBJECTS_PLANES #ifdef POLYOBJECTS_PLANES
...@@ -634,6 +634,9 @@ void R_ExpandPlane(visplane_t *pl, INT32 start, INT32 stop) ...@@ -634,6 +634,9 @@ void R_ExpandPlane(visplane_t *pl, INT32 start, INT32 stop)
return; return;
#endif #endif
if (pl->minx > start) pl->minx = start;
if (pl->maxx < stop) pl->maxx = stop;
/*
if (start < pl->minx) if (start < pl->minx)
{ {
unionl = start; unionl = start;
...@@ -651,15 +654,16 @@ void R_ExpandPlane(visplane_t *pl, INT32 start, INT32 stop) ...@@ -651,15 +654,16 @@ void R_ExpandPlane(visplane_t *pl, INT32 start, INT32 stop)
{ {
unionh = pl->maxx; unionh = pl->maxx;
} }
/*
for (x = start; x <= stop; x++) for (x = start; x <= stop; x++)
if (pl->top[x] != 0xffff || pl->bottom[x] != 0x0000) if (pl->top[x] != 0xffff || pl->bottom[x] != 0x0000)
break; break;
if (x <= stop) if (x <= stop)
I_Error("R_ExpandPlane: planes in same subsector overlap?!\nminx: %d, maxx: %d, start: %d, stop: %d\n", pl->minx, pl->maxx, start, stop); I_Error("R_ExpandPlane: planes in same subsector overlap?!\nminx: %d, maxx: %d, start: %d, stop: %d\n", pl->minx, pl->maxx, start, stop);
*/
pl->minx = unionl, pl->maxx = unionh; pl->minx = unionl, pl->maxx = unionh;
*/
} }
// //
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment