From 8077c495935b3cd6f289b220bf8e972cfcfd9279 Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Mon, 22 Feb 2016 10:30:24 +0200 Subject: Fixed removing entities from parent chunks --- src/ChunkMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index 935f03c10..660d4a9ea 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -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) -- cgit v1.2.3