From f5ce03d10d883e7c5d6ae9a4ad94227769059d8b Mon Sep 17 00:00:00 2001 From: Mat Date: Sun, 3 May 2020 02:58:53 +0300 Subject: Assert if world is incorrect --- src/World.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/World.cpp b/src/World.cpp index 2fde36259..b8a1dcf35 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -1025,6 +1025,7 @@ void cWorld::Tick(std::chrono::milliseconds a_Dt, std::chrono::milliseconds a_La for (auto & Entity : EntitiesToAdd) { auto EntityPtr = Entity.get(); + ASSERT(EntityPtr->GetWorld() == this); m_ChunkMap->AddEntity(std::move(Entity)); EntityPtr->OnAddToWorld(*this); ASSERT(!EntityPtr->IsTicking()); -- cgit v1.2.3