mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-17 17:08:39 +00:00
ServerEnv: Clean up object lifecycle handling (#6414)
* ServerEnv: Clean up object lifecycle handling
This commit is contained in:
parent
edbc533414
commit
04839f233f
8 changed files with 175 additions and 213 deletions
|
@ -35,6 +35,7 @@ class PlayerDatabase;
|
|||
class PlayerSAO;
|
||||
class ServerEnvironment;
|
||||
class ActiveBlockModifier;
|
||||
struct StaticObject;
|
||||
class ServerActiveObject;
|
||||
class Server;
|
||||
class ServerScripting;
|
||||
|
@ -368,7 +369,7 @@ private:
|
|||
u16 addActiveObjectRaw(ServerActiveObject *object, bool set_changed, u32 dtime_s);
|
||||
|
||||
/*
|
||||
Remove all objects that satisfy (m_removed && m_known_by_count==0)
|
||||
Remove all objects that satisfy (isGone() && m_known_by_count==0)
|
||||
*/
|
||||
void removeRemovedObjects();
|
||||
|
||||
|
@ -388,6 +389,14 @@ private:
|
|||
*/
|
||||
void deactivateFarObjects(bool force_delete);
|
||||
|
||||
/*
|
||||
A few helpers used by the three above methods
|
||||
*/
|
||||
void deleteStaticFromBlock(
|
||||
ServerActiveObject *obj, u16 id, u32 mod_reason, bool no_emerge);
|
||||
bool saveStaticToBlock(v3s16 blockpos, u16 store_id,
|
||||
ServerActiveObject *obj, const StaticObject &s_obj, u32 mod_reason);
|
||||
|
||||
/*
|
||||
Member variables
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue