1
0

Fix client disconnect assert (#4579)

This commit is contained in:
peterbell10
2020-03-29 21:58:19 +01:00
committed by GitHub
parent 1e4cf9ce48
commit 6116f899de
2 changed files with 9 additions and 5 deletions

View File

@@ -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;
}
}
{