1
0
Fork 0

Fixed removing entities from parent chunks

This commit is contained in:
LogicParrot 2016-02-22 10:30:24 +02:00
parent 81e80f6edb
commit 8077c49593
1 changed files with 1 additions and 1 deletions

View File

@ -1685,7 +1685,7 @@ bool cChunkMap::HasEntity(UInt32 a_UniqueID)
void cChunkMap::RemoveEntity(cEntity * a_Entity)
{
cCSLock Lock(m_CSLayers);
cChunkPtr Chunk = GetChunkNoGen(a_Entity->GetChunkX(), a_Entity->GetChunkZ());
cChunkPtr Chunk = a_Entity->GetParentChunk();
// Even if a chunk is not valid, it may still contain entities such as players; make sure to remove them (#1190)
if (Chunk == nullptr)