summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-04-26 00:32:30 +0200
committerHowaner <franzi.moos@googlemail.com>2014-04-26 00:32:30 +0200
commit7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f (patch)
treec06c0e15699d0a120820176fe979dcbceb63b8b0 /src/Entities/Entity.h
parentMerge pull request #935 from archshift/projectile-fixes (diff)
downloadcuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar
cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar.gz
cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar.bz2
cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar.lz
cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar.xz
cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar.zst
cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.zip
Diffstat (limited to 'src/Entities/Entity.h')
-rw-r--r--src/Entities/Entity.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index 86efc5a98..fc4186afc 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -262,8 +262,8 @@ public:
// tolua_end
- /// Makes this entity take damage specified in the a_TDI. The TDI is sent through plugins first, then applied
- virtual void DoTakeDamage(TakeDamageInfo & a_TDI);
+ /** Makes this entity take damage specified in the a_TDI. The TDI is sent through plugins first, then applied. If it returns false, the entity hasn't become any damage. */
+ virtual bool DoTakeDamage(TakeDamageInfo & a_TDI);
// tolua_begin
@@ -391,6 +391,12 @@ public:
virtual bool IsSubmerged(void) const{ return m_IsSubmerged; }
/** Gets remaining air of a monster */
int GetAirLevel(void) const { return m_AirLevel; }
+
+ /** Gets the invulnerable ticks from the entity */
+ int GetInvulnerableTicks(void) const { return m_InvulnerableTicks; }
+
+ /** Set the invulnerable ticks from the entity */
+ void SetInvulnerableTicks(int a_InvulnerableTicks) { m_InvulnerableTicks = a_InvulnerableTicks; }
// tolua_end
@@ -493,11 +499,14 @@ private:
// Measured in Kilograms (Kg)
double m_Mass;
- /// Width of the entity, in the XZ plane. Since entities are represented as cylinders, this is more of a diameter.
+ // Width of the entity, in the XZ plane. Since entities are represented as cylinders, this is more of a diameter.
double m_Width;
- /// Height of the entity (Y axis)
+ // Height of the entity (Y axis)
double m_Height;
+
+ // If a player hunt a entity, the entity become a invulnerable of 20 ticks
+ int m_InvulnerableTicks;
} ; // tolua_export
typedef std::list<cEntity *> cEntityList;