From ada984facf47465b7a081eaf75d5541110c12f60 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 16 Jun 2012 08:35:07 +0000 Subject: Exported cWorld::ForEachEntity and cWorld::ForEachEntityInChunk; no idea if they actually work git-svn-id: http://mc-server.googlecode.com/svn/trunk@620 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChunkMap.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/cChunkMap.h') diff --git a/source/cChunkMap.h b/source/cChunkMap.h index 1d90c6aaa..df5cb5814 100644 --- a/source/cChunkMap.h +++ b/source/cChunkMap.h @@ -21,6 +21,7 @@ class cPlayer; typedef std::list cClientHandleList; typedef cChunk * cChunkPtr; +typedef cItemCallback cEntityCallback; @@ -126,6 +127,9 @@ public: /// Removes the entity from the chunk specified void RemoveEntityFromChunk(cEntity * a_Entity, int a_ChunkX, int a_ChunkY, int a_ChunkZ); + /// Calls the callback for each entity in the specified chunk; returns true if all entities processed, false if the callback aborted by returning true + bool ForEachEntityInChunk(int a_ChunkX, int a_ChunkZ, cEntityCallback & a_Callback); // Lua-accessible + /// Touches the chunk, causing it to be loaded or generated void TouchChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ); -- cgit v1.2.3