summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2022-07-11 00:55:11 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2022-07-19 23:33:09 +0200
commitcd97aa83307ce33068082dc57deee8d922fec432 (patch)
tree7ea02bf81e102e80df32d527a085c3ecd3f66d44 /src/ChunkMap.cpp
parentClientHandle: fix incorrect position floor (diff)
downloadcuberite-Pickups.tar
cuberite-Pickups.tar.gz
cuberite-Pickups.tar.bz2
cuberite-Pickups.tar.lz
cuberite-Pickups.tar.xz
cuberite-Pickups.tar.zst
cuberite-Pickups.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 82631e6ed..110a1f8f7 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -916,14 +916,15 @@ void cChunkMap::AddEntity(OwnedEntity a_Entity)
}
const auto EntityPtr = a_Entity.get();
- ASSERT(EntityPtr->GetWorld() == m_World);
auto & Chunk = ConstructChunk(a_Entity->GetChunkX(), a_Entity->GetChunkZ());
Chunk.AddEntity(std::move(a_Entity));
- EntityPtr->OnAddToWorld(*m_World);
ASSERT(!EntityPtr->IsTicking());
+ ASSERT(EntityPtr->GetWorld() == m_World);
+
EntityPtr->SetIsTicking(true);
+ EntityPtr->OnAddToWorld(*m_World);
cPluginManager::Get()->CallHookSpawnedEntity(*m_World, *EntityPtr);
}