1
0
Fork 0

Merge pull request #3044 from LogicParrot/chunkRemove

Fixed removing entities from parent chunks
This commit is contained in:
LogicParrot 2016-02-23 16:05:39 +02:00
commit 3c671b9c23
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)