Changed entity ownership model to use smart pointers
This commit is contained in:
+5
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user