slightly optimize P_CreateBlockMap
This commit is contained in:
1 parent
a0bc9e119c
commit
bce066f3d0
1 file changed
+15
-8
+15
-8
@@ -1508,16 +1508,23 @@ static void P_CreateBlockMap(void)
|
||||
// First find limits of map
|
||||
for (i = 0; i < numvertexes; i++)
|
||||
{
|
||||
if (vertexes[i].x>>FRACBITS < minx)
|
||||
minx = vertexes[i].x>>FRACBITS;
|
||||
else if (vertexes[i].x>>FRACBITS > maxx)
|
||||
maxx = vertexes[i].x>>FRACBITS;
|
||||
if (vertexes[i].y>>FRACBITS < miny)
|
||||
miny = vertexes[i].y>>FRACBITS;
|
||||
else if (vertexes[i].y>>FRACBITS > maxy)
|
||||
maxy = vertexes[i].y>>FRACBITS;
|
||||
fixed_t t;
|
||||
|
||||
if ((t = vertexes[i].x) < minx)
|
||||
minx = t;
|
||||
else if (t > maxx)
|
||||
maxx = t;
|
||||
if ((t = vertexes[i].y) < miny)
|
||||
miny = t;
|
||||
else if (t > maxy)
|
||||
maxy = t;
|
||||
}
|
||||
|
||||
minx >>= FRACBITS;
|
||||
maxx >>= FRACBITS;
|
||||
miny >>= FRACBITS;
|
||||
maxy >>= FRACBITS;
|
||||
|
||||
// Save blockmap parameters
|
||||
bmaporgx = minx << FRACBITS;
|
||||
bmaporgy = miny << FRACBITS;
|
||||
|
||||
Reference in new issue
Block a user