summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-20 11:39:25 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-20 11:39:25 +0200
commit88c877f79c37e7485f0c4cfa1ab103ed73e4f551 (patch)
treedfaa3c6349c91fc70d8b351496a9c0b3d8d12784 /src/Entities/Entity.h
parentAdded destroy-timer system to splash potion entities (diff)
parentAdded m_TicksAlive to entities, allows projectiles to hit their creators (diff)
downloadcuberite-88c877f79c37e7485f0c4cfa1ab103ed73e4f551.tar
cuberite-88c877f79c37e7485f0c4cfa1ab103ed73e4f551.tar.gz
cuberite-88c877f79c37e7485f0c4cfa1ab103ed73e4f551.tar.bz2
cuberite-88c877f79c37e7485f0c4cfa1ab103ed73e4f551.tar.lz
cuberite-88c877f79c37e7485f0c4cfa1ab103ed73e4f551.tar.xz
cuberite-88c877f79c37e7485f0c4cfa1ab103ed73e4f551.tar.zst
cuberite-88c877f79c37e7485f0c4cfa1ab103ed73e4f551.zip
Diffstat (limited to 'src/Entities/Entity.h')
-rw-r--r--src/Entities/Entity.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index 88f8528e9..83fe76e7e 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -416,6 +416,9 @@ public:
/** Gets remaining air of a monster */
int GetAirLevel(void) const { return m_AirLevel; }
+ /** Gets number of ticks this entity has existed for */
+ long int GetTicksAlive(void) const { return m_TicksAlive; }
+
/** Gets the invulnerable ticks from the entity */
int GetInvulnerableTicks(void) const { return m_InvulnerableTicks; }
@@ -521,6 +524,9 @@ protected:
int m_AirLevel;
int m_AirTickTimer;
+ /** The number of ticks this entity has been alive for */
+ long int m_TicksAlive;
+
private:
/** Measured in degrees, [-180, +180) */
double m_HeadYaw;