summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-04 15:15:10 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-04 15:15:10 +0200
commit0d1804e439ec0028be4d5380e66c13481781fc57 (patch)
tree95d4c3ab397568f36832cf27cf98c351e9d22e4d /src/ChunkMap.cpp
parentFixed lever and button powering direction (diff)
parentFixed pressure plate oversights (diff)
downloadcuberite-0d1804e439ec0028be4d5380e66c13481781fc57.tar
cuberite-0d1804e439ec0028be4d5380e66c13481781fc57.tar.gz
cuberite-0d1804e439ec0028be4d5380e66c13481781fc57.tar.bz2
cuberite-0d1804e439ec0028be4d5380e66c13481781fc57.tar.lz
cuberite-0d1804e439ec0028be4d5380e66c13481781fc57.tar.xz
cuberite-0d1804e439ec0028be4d5380e66c13481781fc57.tar.zst
cuberite-0d1804e439ec0028be4d5380e66c13481781fc57.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 193937278..d7164a6a5 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -1652,7 +1652,10 @@ void cChunkMap::AddEntity(cEntity * a_Entity)
{
cCSLock Lock(m_CSLayers);
cChunkPtr Chunk = GetChunkNoGen(a_Entity->GetChunkX(), ZERO_CHUNK_Y, a_Entity->GetChunkZ());
- if ((Chunk == NULL) || !Chunk->IsValid())
+ if (
+ (Chunk == NULL) || // Chunk not present at all
+ (!Chunk->IsValid() && !a_Entity->IsPlayer()) // Chunk present, but no valid data; players need to spawn in such chunks (#953)
+ )
{
LOGWARNING("Entity at %p (%s, ID %d) spawning in a non-existent chunk, the entity is lost.",
a_Entity, a_Entity->GetClass(), a_Entity->GetUniqueID()