From 366ecf9dfd38d612c0685f3fbf8b3a95b9900697 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 10 Jun 2014 18:25:53 +0200 Subject: Fixed a race condition when adding a player to a world. --- src/World.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/World.cpp') diff --git a/src/World.cpp b/src/World.cpp index ebe6b53e6..6bcd1391a 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -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) -- cgit v1.2.3