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:
parent
def46c6cdb
commit
2c860a6a42
4 changed files with 48 additions and 30 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue