summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-21 23:07:38 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-21 23:07:38 +0200
commit6e681269d9dfb33b5b73f4f01a61def247b3aee7 (patch)
treed9409a8b0b00c439dcd5d2f7d4c1f2cf66592c18 /src/Entities/Entity.cpp
parentMore suggestions (diff)
downloadcuberite-6e681269d9dfb33b5b73f4f01a61def247b3aee7.tar
cuberite-6e681269d9dfb33b5b73f4f01a61def247b3aee7.tar.gz
cuberite-6e681269d9dfb33b5b73f4f01a61def247b3aee7.tar.bz2
cuberite-6e681269d9dfb33b5b73f4f01a61def247b3aee7.tar.lz
cuberite-6e681269d9dfb33b5b73f4f01a61def247b3aee7.tar.xz
cuberite-6e681269d9dfb33b5b73f4f01a61def247b3aee7.tar.zst
cuberite-6e681269d9dfb33b5b73f4f01a61def247b3aee7.zip
Diffstat (limited to 'src/Entities/Entity.cpp')
-rw-r--r--src/Entities/Entity.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 9110cd83b..9a8c6586d 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -57,6 +57,7 @@ cEntity::cEntity(eEntityType a_EntityType, double a_X, double a_Y, double a_Z, d
, m_Width(a_Width)
, m_Height(a_Height)
, m_InvulnerableTicks(0)
+ , m_IsTravellingThroughPortal(false)
{
cCSLock Lock(m_CSCount);
m_EntityCount++;
@@ -1183,7 +1184,7 @@ bool cEntity::MoveToWorld(const AString & a_WorldName, cWorld * a_World, bool a_
}
// Remove all links to the old world
- GetWorld()->RemoveEntity(this);
+ SetIsTravellingThroughPortal(true); // cChunk handles entity removal
GetWorld()->BroadcastDestroyEntity(*this);
// Queue add to new world