summaryrefslogtreecommitdiff
path: root/src/serverenvironment.h
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2017-09-15 12:19:01 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-09-15 12:19:01 +0200
commit04839f233f37faa9af406ea66fc6c199127781eb (patch)
treed243fcae7f57fe4cf22046f42cda5424a1561e4c /src/serverenvironment.h
parentedbc533414b0ba991a82f8003d90924e1dc60d95 (diff)
downloadminetest-04839f233f37faa9af406ea66fc6c199127781eb.tar.gz
minetest-04839f233f37faa9af406ea66fc6c199127781eb.tar.bz2
minetest-04839f233f37faa9af406ea66fc6c199127781eb.zip
ServerEnv: Clean up object lifecycle handling (#6414)
* ServerEnv: Clean up object lifecycle handling
Diffstat (limited to 'src/serverenvironment.h')
-rw-r--r--src/serverenvironment.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/serverenvironment.h b/src/serverenvironment.h
index 3fdd6d77e..b2d844048 100644
--- a/src/serverenvironment.h
+++ b/src/serverenvironment.h
@@ -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();
@@ -389,6 +390,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
*/