From 549ac332d5f9627ff410da4f97a80e0c07808177 Mon Sep 17 00:00:00 2001 From: Shocker Date: Tue, 26 Aug 2014 14:19:19 +0300 Subject: 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 --- src/server/game/Maps/Map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server') 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]; -- cgit v1.2.3