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

This commit is contained in:
Shocker
2014-08-26 14:19:19 +03:00
parent bc42c48d97
commit 549ac332d5
+1 -1
View File
@@ -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];