summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-12 16:21:07 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-12 16:21:07 +0200
commit29567c56107c86b70da130f995564beb2eaf424c (patch)
treebe7b996042b28d8ebac0c7c665963d1d7e991600 /src/Entities/Entity.h
parentMerge branch 'master' into portals (diff)
downloadcuberite-29567c56107c86b70da130f995564beb2eaf424c.tar
cuberite-29567c56107c86b70da130f995564beb2eaf424c.tar.gz
cuberite-29567c56107c86b70da130f995564beb2eaf424c.tar.bz2
cuberite-29567c56107c86b70da130f995564beb2eaf424c.tar.lz
cuberite-29567c56107c86b70da130f995564beb2eaf424c.tar.xz
cuberite-29567c56107c86b70da130f995564beb2eaf424c.tar.zst
cuberite-29567c56107c86b70da130f995564beb2eaf424c.zip
Diffstat (limited to 'src/Entities/Entity.h')
-rw-r--r--src/Entities/Entity.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index 934e0302b..4d922aa11 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -338,7 +338,7 @@ public:
virtual void OnFinishedBurning(void);
/** Creates exit portal at given coordinates */
- void CreateExitPortal(int a_BlockX, int a_BlockY, int a_BlockZ);
+ static void CreateExitPortal(int a_BlockX, int a_BlockY, int a_BlockZ, double a_EntityWidth, double a_EntityHeight, cWorld & a_World, int a_UniqueIDToTeleport);
// tolua_begin
@@ -374,7 +374,7 @@ public:
virtual void TeleportToCoords(double a_PosX, double a_PosY, double a_PosZ);
/** Moves entity to specified world */
- virtual bool MoveToWorld(const AString & a_WorldName, cWorld * a_World = NULL);
+ virtual bool MoveToWorld(const AString & a_WorldName, cWorld * a_World = NULL, bool a_ShouldSendRespawn = true);
// tolua_end
@@ -510,6 +510,12 @@ protected:
/** Air level of a mobile */
int m_AirLevel;
int m_AirTickTimer;
+
+ /** Portal delay timer and cooldown boolean
+ First value is to delay sending the repsawn packet (which triggers the Entering the {Dimension} screen).
+ Second value is to prevent a teleportation loop by ensuring we do not reenter a portal that we came out of.
+ */
+ std::pair<unsigned short, bool> m_PortalCooldownData;
private:
/** Measured in degrees, [-180, +180) */