From 630ceed2c0572df2cf5c34b66b185d021200b806 Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Tue, 29 Mar 2016 21:23:53 +0300 Subject: Entities are never lost --- src/Chunk.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Chunk.cpp') diff --git a/src/Chunk.cpp b/src/Chunk.cpp index fa479bf9a..db8966a23 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -693,10 +693,9 @@ void cChunk::MoveEntityToNewChunk(cEntity * a_Entity) cChunk * Neighbor = GetNeighborChunk(a_Entity->GetChunkX() * cChunkDef::Width, a_Entity->GetChunkZ() * cChunkDef::Width); if (Neighbor == nullptr) { - Neighbor = m_ChunkMap->GetChunkNoLoad(a_Entity->GetChunkX(), a_Entity->GetChunkZ()); - if (Neighbor == nullptr) + Neighbor = m_ChunkMap->GetChunk(a_Entity->GetChunkX(), a_Entity->GetChunkZ()); + if (Neighbor == nullptr) // This will assert inside GetChunk in debug builds { - // TODO: What to do with this? LOGWARNING("%s: Failed to move entity, destination chunk unreachable. Entity lost", __FUNCTION__); return; } -- cgit v1.2.3