diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-07-06 18:27:32 +0200 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-07-06 18:27:32 +0200 |
commit | 0f8c1d4a475f9779fd2bd1f76763b7407adcd33e (patch) | |
tree | 2b86df307ede521047749a3af335ab305779e69f | |
parent | 072787b58f05016195832a8e86c180aa86d318e2 (diff) |
Core/Maps: Don't load vmaps/mmaps if disabled in configs
Don't try to load vmaps/mmaps if they are disabled in the configs.
Fixes #12392
-rw-r--r-- | src/server/game/Maps/Map.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 01e3af149dc..a49e69ec311 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -119,6 +119,9 @@ bool Map::ExistVMap(uint32 mapid, int gx, int gy) void Map::LoadMMap(int gx, int gy) { + if (!MMAP::MMapFactory::IsPathfindingEnabled(GetId())) + return; + bool mmapLoadResult = MMAP::MMapFactory::createOrGetMMapManager()->loadMap((sWorld->GetDataPath() + "mmaps").c_str(), GetId(), gx, gy); if (mmapLoadResult) @@ -129,6 +132,8 @@ void Map::LoadMMap(int gx, int gy) void Map::LoadVMap(int gx, int gy) { + if (!VMAP::VMapFactory::createOrGetVMapManager()->isMapLoadingEnabled()) + return; // x and y are swapped !! int vmapLoadResult = VMAP::VMapFactory::createOrGetVMapManager()->loadMap((sWorld->GetDataPath()+ "vmaps").c_str(), GetId(), gx, gy); switch (vmapLoadResult) |