summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2016-12-19 21:12:23 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2017-08-07 20:24:16 +0200
commit4ef47aed62364f9cf1474864e5cf94232b4477af (patch)
tree28ca15247c2437b91e9aada48c2da4a1a3c00c17 /src/ChunkMap.h
parentRemoved unneeded includes (#3902) (diff)
downloadcuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.gz
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.bz2
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.lz
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.xz
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.zst
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkMap.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ChunkMap.h b/src/ChunkMap.h
index 330c6532d..431ba6c2a 100644
--- a/src/ChunkMap.h
+++ b/src/ChunkMap.h
@@ -207,17 +207,18 @@ public:
void RemoveClientFromChunks(cClientHandle * a_Client);
/** Adds the entity to its appropriate chunk, takes ownership of the entity pointer */
- void AddEntity(cEntity * a_Entity);
+ void AddEntity(OwnedEntity a_Entity);
/** Adds the entity to its appropriate chunk, if the entity is not already added.
Takes ownership of the entity pointer */
- void AddEntityIfNotPresent(cEntity * a_Entity);
+ void AddEntityIfNotPresent(OwnedEntity a_Entity);
/** Returns true if the entity with specified ID is present in the chunks */
bool HasEntity(UInt32 a_EntityID);
- /** Removes the entity from its appropriate chunk */
- void RemoveEntity(cEntity * a_Entity);
+ /** Removes the entity from its appropriate chunk
+ Returns an owning reference to the found entity. */
+ OwnedEntity 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