summaryrefslogtreecommitdiffstats
path: root/source/World.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-13 23:28:55 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-13 23:28:55 +0200
commitf5842062d3f9594d8f22f8938915194d20ebdf5f (patch)
tree54a92af49ef0e3cff48a22259183399d409c3f89 /source/World.h
parentRewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick() (diff)
downloadcuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar
cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar.gz
cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar.bz2
cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar.lz
cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar.xz
cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar.zst
cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.zip
Diffstat (limited to '')
-rw-r--r--source/World.h7
1 files changed, 3 insertions, 4 deletions
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