1
0

Fixed a race condition when adding a player to a world.

This commit is contained in:
madmaxoft
2014-06-10 18:25:53 +02:00
parent 6c43799cc5
commit 366ecf9dfd
3 changed files with 29 additions and 4 deletions

View File

@@ -3148,10 +3148,7 @@ void cWorld::AddQueuedPlayers(void)
(*itr)->SetWorld(this);
// Add to chunkmap, if not already there (Spawn vs MoveToWorld):
if (!m_ChunkMap->HasEntity((*itr)->GetUniqueID()))
{
m_ChunkMap->AddEntity(*itr);
}
m_ChunkMap->AddEntityIfNotPresent(*itr);
} // for itr - PlayersToAdd[]
} // Lock(m_CSPlayers)