From 422ccc8e44db42df025648fc98647de7c0fa693f Mon Sep 17 00:00:00 2001 From: Anton Popovichenko Date: Wed, 5 Nov 2025 10:27:13 +0100 Subject: [PATCH] fix(mmaps): [REQUIRES_REGENERATION] Fix baseUnitDim division to resolve pathing edge cases (#23480) Co-authored-by: Rocco Silipo <108557877+Rorschach91@users.noreply.github.com> --- src/common/Collision/Maps/MapDefines.h | 2 +- src/tools/mmaps_generator/Config.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/Collision/Maps/MapDefines.h b/src/common/Collision/Maps/MapDefines.h index a40437689..2700878e6 100644 --- a/src/common/Collision/Maps/MapDefines.h +++ b/src/common/Collision/Maps/MapDefines.h @@ -26,7 +26,7 @@ #define SIZE_OF_GRIDS 533.3333f #define MMAP_MAGIC 0x4d4d4150 // 'MMAP' -#define MMAP_VERSION 17 +#define MMAP_VERSION 18 struct MmapTileRecastConfig { diff --git a/src/tools/mmaps_generator/Config.cpp b/src/tools/mmaps_generator/Config.cpp index 3e5ca92dc..f815139d2 100644 --- a/src/tools/mmaps_generator/Config.cpp +++ b/src/tools/mmaps_generator/Config.cpp @@ -25,7 +25,7 @@ namespace MMAP { float ComputeBaseUnitDim(int vertexPerMapEdge) { - return GRID_SIZE / static_cast(vertexPerMapEdge - 1); + return GRID_SIZE / static_cast(vertexPerMapEdge); } std::pair MakeTileKey(uint32 x, uint32 y)