summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-03-31 11:41:52 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-03-31 11:41:52 +0200
commit0f2cebb7861516e1046a81c920a7e12be2747ac6 (patch)
treec9c029db48142bc3d87b6ed6f245237ded472466 /src/Chunk.cpp
parentMerge pull request #3109 from LogicParrot/moveToNewWorld (diff)
parentEntities are never lost (diff)
downloadcuberite-0f2cebb7861516e1046a81c920a7e12be2747ac6.tar
cuberite-0f2cebb7861516e1046a81c920a7e12be2747ac6.tar.gz
cuberite-0f2cebb7861516e1046a81c920a7e12be2747ac6.tar.bz2
cuberite-0f2cebb7861516e1046a81c920a7e12be2747ac6.tar.lz
cuberite-0f2cebb7861516e1046a81c920a7e12be2747ac6.tar.xz
cuberite-0f2cebb7861516e1046a81c920a7e12be2747ac6.tar.zst
cuberite-0f2cebb7861516e1046a81c920a7e12be2747ac6.zip
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp5
1 files changed, 2 insertions, 3 deletions
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;
}