From 008addf5d746b2d158f9116e4f6302861b42852f Mon Sep 17 00:00:00 2001 From: faketruth Date: Thu, 16 Feb 2012 17:20:28 +0000 Subject: Got rid of dangerous GetEntity(), not using DoWithEntity() git-svn-id: http://mc-server.googlecode.com/svn/trunk@278 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWorld.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source/cWorld.h') diff --git a/source/cWorld.h b/source/cWorld.h index c47fa70e8..025d0782a 100644 --- a/source/cWorld.h +++ b/source/cWorld.h @@ -34,6 +34,7 @@ class cWorldGenerator; // The generator that actually generates the chunks for class cChunkGenerator; // The thread responsible for generating chunks typedef std::list< cPlayer * > cPlayerList; typedef cItemCallback cPlayerListCallback; +typedef cItemCallback cEntityCallback; @@ -102,12 +103,9 @@ public: void AddEntity( cEntity* a_Entity ); void RemoveEntityFromChunk( cEntity * a_Entity); - - // TODO: This interface is dangerous! - cEntityList & GetEntities(void) {return m_AllEntities; } - // TODO: This interface is dangerous! - cEntity * GetEntity( int a_UniqueID ); //tolua_export + // TODO: Export to Lua + bool DoWithEntity( int a_UniqueID, cEntityCallback & a_Callback ); void SetBlock( int a_X, int a_Y, int a_Z, char a_BlockType, char a_BlockMeta ); //tolua_export void FastSetBlock( int a_X, int a_Y, int a_Z, char a_BlockType, char a_BlockMeta ); //tolua_export -- cgit v1.2.3