summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorMarvin Kopf <marvinkopf@posteo.de>2016-02-21 00:07:58 +0100
committerMarvin Kopf <marvinkopf@posteo.de>2016-02-21 00:07:58 +0100
commitf9506f6405a01ddfa855e9a35fdb53a86108edf5 (patch)
tree0f424d5643a6e2b927fdee1083f655aea90ae8cb /src/World.cpp
parentMerge pull request #3032 from cuberite/3030-fix (diff)
downloadcuberite-f9506f6405a01ddfa855e9a35fdb53a86108edf5.tar
cuberite-f9506f6405a01ddfa855e9a35fdb53a86108edf5.tar.gz
cuberite-f9506f6405a01ddfa855e9a35fdb53a86108edf5.tar.bz2
cuberite-f9506f6405a01ddfa855e9a35fdb53a86108edf5.tar.lz
cuberite-f9506f6405a01ddfa855e9a35fdb53a86108edf5.tar.xz
cuberite-f9506f6405a01ddfa855e9a35fdb53a86108edf5.tar.zst
cuberite-f9506f6405a01ddfa855e9a35fdb53a86108edf5.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/World.cpp b/src/World.cpp
index d8386119d..dcc36f5f3 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -1019,7 +1019,10 @@ void cWorld::Tick(std::chrono::milliseconds a_Dt, std::chrono::milliseconds a_La
(*itr)->SetWorld(this);
m_ChunkMap->AddEntity(*itr);
ASSERT(!(*itr)->IsTicking());
- (*itr)->SetIsTicking(true);
+ if (m_ChunkMap->HasEntity((*itr)->GetUniqueID()))
+ {
+ (*itr)->SetIsTicking(true);
+ }
}
m_EntitiesToAdd.clear();
}
@@ -3805,7 +3808,10 @@ void cWorld::AddQueuedPlayers(void)
// Add to chunkmap, if not already there (Spawn vs MoveToWorld):
m_ChunkMap->AddEntityIfNotPresent(*itr);
ASSERT(!(*itr)->IsTicking());
- (*itr)->SetIsTicking(true);
+ if (m_ChunkMap->HasEntity((*itr)->GetUniqueID()))
+ {
+ (*itr)->SetIsTicking(true);
+ }
} // for itr - PlayersToAdd[]
} // Lock(m_CSPlayers)