Fix blockmap limits

Co-Authored-By: andrey-budko <6490190+andrey-budko@users.noreply.github.com>
This commit is contained in:
kraflab 2023-05-25 22:34:28 +02:00 committed by Fabian Greffrath
parent 411f934292
commit 43b47a8cb0

View File

@ -682,6 +682,14 @@ static void P_CreateBlockMap(void)
// scan for map limits, which the blockmap must enclose // scan for map limits, which the blockmap must enclose
// This fixes MBF's code, which has a bug where maxx/maxy
// are wrong if the 0th node has the largest x or y
if (numvertexes)
{
map_minx = map_maxx = vertexes[0].x;
map_miny = map_maxy = vertexes[0].y;
}
for (i=0;i<numvertexes;i++) for (i=0;i<numvertexes;i++)
{ {
fixed_t t; fixed_t t;