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; + } } } }