diff options
author | Shocker <shocker@freakz.ro> | 2014-08-26 14:19:19 +0300 |
---|---|---|
committer | Shocker <shocker@freakz.ro> | 2014-08-26 14:19:19 +0300 |
commit | 549ac332d5f9627ff410da4f97a80e0c07808177 (patch) | |
tree | e1b186615ee771fd6fc2e4459bbe52a5847e54b4 /src | |
parent | bc42c48d974f48f473a112ac814876b87b207060 (diff) |
Core/Maps: Don't use EnsureGridCreated_i() for base map in Map::LoadMap, use EnsureGridCreated() which is thread safe because although the LoadMap() call probably came from a thread safe EnsureGridCreated() call from the current map instance, multiple map instances can load grids for the same base map in the same time, and each of them has it's own mutex, therefore we should rely on the basemap's mutex
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Maps/Map.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 243a931d463..9e29fb01c3b 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -159,7 +159,7 @@ void Map::LoadMap(int gx, int gy, bool reload) // load grid map for base map if (!m_parentMap->GridMaps[gx][gy]) - m_parentMap->EnsureGridCreated_i(GridCoord(63-gx, 63-gy)); + m_parentMap->EnsureGridCreated(GridCoord(63-gx, 63-gy)); ((MapInstanced*)(m_parentMap))->AddGridMapReference(GridCoord(gx, gy)); GridMaps[gx][gy] = m_parentMap->GridMaps[gx][gy]; |