From d636875fc0727e024e7bf9af42a35f210d0086d7 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 1 Mar 2013 19:33:41 +0000 Subject: Previous commit was missing the Entity.h file git-svn-id: http://mc-server.googlecode.com/svn/trunk@1232 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Entity.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source') 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 -- cgit v1.2.3