From e92b9e7ecbdf2918aab59d4eeb7bb5966430b264 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 24 Aug 2012 07:58:26 +0000 Subject: Monster classes don't use cPackets. Chat messages are sent / broadcast without cPackets. BlockEntities don't use cPackets. git-svn-id: http://mc-server.googlecode.com/svn/trunk@783 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cEntity.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/cEntity.h') diff --git a/source/cEntity.h b/source/cEntity.h index ed32cdf4b..50955f9ce 100644 --- a/source/cEntity.h +++ b/source/cEntity.h @@ -66,7 +66,7 @@ public: cEntity(const double & a_X, const double & a_Y, const double & a_Z); virtual ~cEntity(); - virtual void Initialize( cWorld* a_World ); + virtual void Initialize(cWorld * a_World); enum eEntityType { @@ -114,8 +114,11 @@ public: virtual void Tick(float a_Dt) = 0; //tolua_export - virtual cPacket * GetSpawnPacket(void) const {ASSERT(!"GetSpawnedPacket unimplemented!"); return NULL; }; // _X: Needs to be implemented due to Lua bindings - void SpawnOn (cClientHandle * a_Client); // tolua_export + /** 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 void WrapRotation(); -- cgit v1.2.3