From dc7f0c45d94a42064a44dfe4f211797074c10f6d Mon Sep 17 00:00:00 2001 From: Gamemechanic Date: Sun, 30 Jul 2023 06:44:39 +0200 Subject: [PATCH] Fix stormwind entrance pathing (#2088) --- contrib/mmap/src/TerrainBuilder.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/mmap/src/TerrainBuilder.cpp b/contrib/mmap/src/TerrainBuilder.cpp index e0fbeb974fe..18f62ede7fe 100644 --- a/contrib/mmap/src/TerrainBuilder.cpp +++ b/contrib/mmap/src/TerrainBuilder.cpp @@ -766,9 +766,12 @@ namespace MMAP float inDist = -1.0f; if (it->IsUnderObject(v, up, isM2, &outDist, &inDist)) // inDist < outDist { - //if there are less than 1.5y between terrain and model then mark the terrain as unwalkable - if (inDist < 1.5f) + // If terrain is under wmo, mark terrain as unwalkable + // If there are less than 1.5y between terrain and m2 then mark the terrain as unwalkable + if (!isM2 || inDist < 1.5f) + { terrainInsideModelsVerts[t] = inDist; + } } } }