1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-17 17:08:39 +00:00

ServerEnvironment & StaticObject cleanups

* isFreeServerActiveObjectId is now part of ServerEnvironment
* getFreeServerActiveObjectId is now part of ServerEnvironment
* StaticObject constructor now take ServerActiveObject instead of type + string. This permits to remove a big string copy in some code parts
This commit is contained in:
Loic Blot 2018-03-09 08:25:48 +01:00 committed by Loïc Blot
parent def46c6cdb
commit 2c860a6a42
4 changed files with 48 additions and 30 deletions

View file

@ -257,6 +257,19 @@ public:
*/
u16 addActiveObject(ServerActiveObject *object);
/**
* Verify if id is a free active object id
* @param id
* @return true if slot is free
*/
bool isFreeServerActiveObjectId(u16 id) const;
/**
* Retrieve the next free activeobject ID
* @return free activeobject ID or zero if not free ID found
*/
u16 getFreeServerActiveObjectId();
/*
Add an active object as a static object to the corresponding
MapBlock.