From 43b47a8cb07fd91b770cde037b8ef41ad842cf94 Mon Sep 17 00:00:00 2001 From: kraflab Date: Thu, 25 May 2023 22:34:28 +0200 Subject: [PATCH] Fix blockmap limits Co-Authored-By: andrey-budko <6490190+andrey-budko@users.noreply.github.com> --- src/p_setup.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/p_setup.c b/src/p_setup.c index d9596459..53ba6329 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -682,6 +682,14 @@ static void P_CreateBlockMap(void) // 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