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/World.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/World.h') diff --git a/source/World.h b/source/World.h index 38506d1a0..70e203bc3 100644 --- a/source/World.h +++ b/source/World.h @@ -207,12 +207,13 @@ public: void SendPlayerList(cPlayer * a_DestPlayer); // Sends playerlist to the player + /// Adds the entity into its appropriate chunk; takes ownership of the entity ptr void AddEntity(cEntity * a_Entity); bool HasEntity(int a_UniqueID); - /// Removes the entity from the chunk specified - void RemoveEntityFromChunk(cEntity * a_Entity, int a_ChunkX, int a_ChunkZ); + /// Removes the entity, the entity ptr ownership is assumed taken by the caller + 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); // Exported in ManualBindings.cpp @@ -558,8 +559,6 @@ private: void TickWeather(float a_Dt); // Handles weather each tick void TickSpawnMobs(float a_Dt); // Handles mob spawning each tick - void RemoveEntity( cEntity * a_Entity ); - /// Creates a new fluid simulator, loads its settings from the inifile (a_FluidName section) cFluidSimulator * InitializeFluidSimulator(cIniFile & a_IniFile, const char * a_FluidName, BLOCKTYPE a_SimulateBlock, BLOCKTYPE a_StationaryBlock); }; // tolua_export -- cgit v1.2.3