From 1394fc8eb5c8c0ac49bb64ce1871a80470f058c3 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 6 Apr 2021 12:26:43 +0100 Subject: Streamline player abilities handling * Update player list gamemode on world change * Fix invisibility for spectators, use entity metadata * Populate m_World for cPlayers on load - Remove SendPlayerMaxSpeed, a duplicate of SendEntityProperties --- src/Entities/Entity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Entities/Entity.cpp') diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 9fc3f80cf..6c777aca4 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -122,7 +122,7 @@ bool cEntity::Initialize(OwnedEntity a_Self, cWorld & a_EntityWorld) */ - ASSERT(m_World == nullptr); + ASSERT(a_Self->IsPlayer() || (m_World == nullptr)); // Players' worlds are loaded from disk. ASSERT(GetParentChunk() == nullptr); SetWorld(&a_EntityWorld); a_EntityWorld.AddEntity(std::move(a_Self)); -- cgit v1.2.3