summaryrefslogtreecommitdiffstats
path: root/source/Entity.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-01 20:33:41 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-01 20:33:41 +0100
commitd636875fc0727e024e7bf9af42a35f210d0086d7 (patch)
treebb17e42189016fbe4b25008644a24e68fcbf186d /source/Entity.h
parentUpdated cEntity API; removed functions that are unusable from Lua, added a few query functions. (diff)
downloadcuberite-d636875fc0727e024e7bf9af42a35f210d0086d7.tar
cuberite-d636875fc0727e024e7bf9af42a35f210d0086d7.tar.gz
cuberite-d636875fc0727e024e7bf9af42a35f210d0086d7.tar.bz2
cuberite-d636875fc0727e024e7bf9af42a35f210d0086d7.tar.lz
cuberite-d636875fc0727e024e7bf9af42a35f210d0086d7.tar.xz
cuberite-d636875fc0727e024e7bf9af42a35f210d0086d7.tar.zst
cuberite-d636875fc0727e024e7bf9af42a35f210d0086d7.zip
Diffstat (limited to 'source/Entity.h')
-rw-r--r--source/Entity.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/Entity.h b/source/Entity.h
index d18896ee7..82e1c3c7a 100644
--- a/source/Entity.h
+++ b/source/Entity.h
@@ -94,7 +94,7 @@ public:
/// Returns the topmost class name for the object
virtual const char * GetClass(void) const;
-
+
// Returns the class name of this class
static const char * GetClassStatic(void);
@@ -138,23 +138,27 @@ public:
void Destroy(); // tolua_export
void RemoveFromChunk(void); // for internal use in cChunk
- virtual void Tick(float a_Dt, MTRand & a_TickRandom); // tolua_export
- virtual void HandlePhysics(float a_Dt) {} // tolua_export
+ virtual void Tick(float a_Dt, MTRand & a_TickRandom);
+ virtual void HandlePhysics(float a_Dt) {}
/** Descendants override this function to send a command to the specified client to spawn the entity on the client.
To spawn on all eligible clients, use cChunkMap::BroadcastSpawnEntity()
Needs to have a default implementation due to Lua bindings.
*/
- virtual void SpawnOn(cClientHandle & a_Client) {ASSERT(!"SpawnOn() unimplemented!"); } // tolua_export
+ virtual void SpawnOn(cClientHandle & a_Client) {ASSERT(!"SpawnOn() unimplemented!"); }
void WrapRotation();
+ // tolua_begin
+
// 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; }
+
+ // tolua_end
protected:
virtual void Destroyed() {} // Called after the entity has been destroyed