diff options
Diffstat (limited to '')
-rw-r--r-- | src/World.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/World.cpp b/src/World.cpp index 2d0dfca9f..a08c269d8 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -2543,9 +2543,13 @@ std::unique_ptr<cPlayer> cWorld::RemovePlayer(cPlayer & a_Player) #ifdef _DEBUG bool cWorld::IsPlayerReferencedInWorldOrChunk(cPlayer & a_Player) { - if (m_ChunkMap->RemoveEntity(a_Player) != nullptr) { - return true; + cLock lock(*this); + auto * Chunk = a_Player.GetParentChunk(); + if (Chunk && Chunk->HasEntity(a_Player.GetUniqueID())) + { + return true; + } } { |