summaryrefslogtreecommitdiffstats
path: root/source/cEntity.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-28 23:59:49 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-28 23:59:49 +0200
commit1651fcd9807f1033a5fc76e60cb17922e687a7b1 (patch)
treec9b82453023b52b05a61bcfd4c882ab5f6b60e23 /source/cEntity.h
parentFixed a few warnings (diff)
downloadcuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar.gz
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar.bz2
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar.lz
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar.xz
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar.zst
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.zip
Diffstat (limited to '')
-rw-r--r--source/cEntity.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/cEntity.h b/source/cEntity.h
index 50955f9ce..a34b7518f 100644
--- a/source/cEntity.h
+++ b/source/cEntity.h
@@ -121,6 +121,13 @@ public:
virtual void SpawnOn(cClientHandle & a_Client) {ASSERT(!"SpawnOn() unimplemented!"); } // tolua_export
void WrapRotation();
+
+ // Metadata flags; descendants may override the defaults:
+ virtual bool IsOnFire (void) const {return (m_BurnPeriod > 0); }
+ virtual bool IsCrouched (void) const {return false; }
+ virtual bool IsRiding (void) const {return false; }
+ virtual bool IsSprinting(void) const {return false; }
+ virtual bool IsRclking (void) const {return false; }
protected:
virtual void Destroyed() {} // Called after the entity has been destroyed
@@ -154,6 +161,9 @@ protected:
eEntityType m_EntityType;
cWorld* m_World;
+
+ float m_FireDamageInterval;
+ float m_BurnPeriod;
}; //tolua_export
typedef std::list<cEntity *> cEntityList;