From e98f93a079c2cfea7b5478e2cb2934874e0b88e0 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 5 Apr 2020 13:41:14 +0100 Subject: Only store IDs across ticks --- src/Entities/Entity.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Entities/Entity.h') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 25784081f..573bc34cf 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -489,7 +489,7 @@ public: /** Returns true if a world change is scheduled to happen. */ bool IsWorldChangeScheduled() const { - return (m_WorldChangeInfo.load() != nullptr); + return (m_WorldChangeInfo.m_NewWorld != nullptr); } /** Updates clients of changes in the entity. */ @@ -662,8 +662,8 @@ protected: cWorld * m_World; - /** If not nullptr, a world change is scheduled and a task is queued in the current world. */ - cAtomicUniquePtr m_WorldChangeInfo; + /** If field m_NewWorld not nullptr, a world change is scheduled and a task is queued in the current world. */ + sWorldChangeInfo m_WorldChangeInfo; /** Whether the entity is capable of taking fire or lava damage. */ bool m_IsFireproof; -- cgit v1.2.3