From f5842062d3f9594d8f22f8938915194d20ebdf5f Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 13 Apr 2013 21:28:55 +0000 Subject: Proper entity removal functions git-svn-id: http://mc-server.googlecode.com/svn/trunk@1386 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/ChunkMap.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source/ChunkMap.h') diff --git a/source/ChunkMap.h b/source/ChunkMap.h index d52b2f263..e3dfdc88f 100644 --- a/source/ChunkMap.h +++ b/source/ChunkMap.h @@ -183,18 +183,15 @@ public: /// Removes the client from all chunks it is present in void RemoveClientFromChunks(cClientHandle * a_Client); - /// Moves the entity from its current chunk to the new chunk specified - void MoveEntityToChunk(cEntity * a_Entity, int a_ChunkX, int a_ChunkZ); - - /// Removes the entity from the chunk specified - void RemoveEntityFromChunk(cEntity * a_Entity, int a_ChunkX, int a_ChunkZ); - /// Adds the entity to its appropriate chunk, takes ownership of the entity pointer void AddEntity(cEntity * a_Entity); /// Returns true if the entity with specified ID is present in the chunks bool HasEntity(int a_EntityID); + /// Removes the entity from its appropriate chunk + void RemoveEntity(cEntity * a_Entity); + /// Calls the callback for each entity in the entire world; returns true if all entities processed, false if the callback aborted by returning true bool ForEachEntity(cEntityCallback & a_Callback); // Lua-accessible -- cgit v1.2.3