aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Map.cpp5
-rw-r--r--src/game/Map.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index 3280970750b..140904bfb19 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -120,7 +120,7 @@ void Map::LoadVMap(int gx,int gy)
}
}
-void Map::LoadMap(int gx,int gy)
+void Map::LoadMap(int gx,int gy, bool reload)
{
if( i_InstanceId != 0 )
{
@@ -138,6 +138,9 @@ void Map::LoadMap(int gx,int gy)
return;
}
+ if(GridMaps[gx][gy] && !reload)
+ return;
+
//map already load, delete it before reloading (Is it necessary? Do we really need the ability the reload maps during runtime?)
if(GridMaps[gx][gy])
{
diff --git a/src/game/Map.h b/src/game/Map.h
index a4309504435..c69fe5f7345 100644
--- a/src/game/Map.h
+++ b/src/game/Map.h
@@ -421,7 +421,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
private:
void LoadMapAndVMap(int gx, int gy);
void LoadVMap(int gx, int gy);
- void LoadMap(int gx,int gy);
+ void LoadMap(int gx,int gy, bool reload = false);
GridMap *GetGrid(float x, float y);
void SetTimer(uint32 t) { i_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; }