diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2022-07-11 00:55:11 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2022-07-19 23:33:09 +0200 |
commit | cd97aa83307ce33068082dc57deee8d922fec432 (patch) | |
tree | 7ea02bf81e102e80df32d527a085c3ecd3f66d44 /src/ChunkMap.cpp | |
parent | ClientHandle: fix incorrect position floor (diff) | |
download | cuberite-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.cpp | 5 |
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); } |