diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-29 22:34:21 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-29 22:34:21 +0200 |
commit | f84e8054534972246e223bf20fac25204849dab6 (patch) | |
tree | a5aafb9715d5dd50c0a63d9b873c582531ca7545 /src/ChunkMap.cpp | |
parent | Unused/duplicate function cleanup (diff) | |
download | cuberite-f84e8054534972246e223bf20fac25204849dab6.tar cuberite-f84e8054534972246e223bf20fac25204849dab6.tar.gz cuberite-f84e8054534972246e223bf20fac25204849dab6.tar.bz2 cuberite-f84e8054534972246e223bf20fac25204849dab6.tar.lz cuberite-f84e8054534972246e223bf20fac25204849dab6.tar.xz cuberite-f84e8054534972246e223bf20fac25204849dab6.tar.zst cuberite-f84e8054534972246e223bf20fac25204849dab6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkMap.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index b93327ddc..14d0d0d94 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -892,7 +892,17 @@ void cChunkMap::AddEntity(OwnedEntity a_Entity) ); return; } + + const auto EntityPtr = a_Entity.get(); + ASSERT(EntityPtr->GetWorld() == m_World); + Chunk->AddEntity(std::move(a_Entity)); + + EntityPtr->OnAddToWorld(*m_World); + ASSERT(!EntityPtr->IsTicking()); + EntityPtr->SetIsTicking(true); + + cPluginManager::Get()->CallHookSpawnedEntity(*m_World, *EntityPtr); } |