]> git.lizzy.rs Git - minetest.git/blobdiff - src/environment.h
Add shutdown hook interface to Lua API
[minetest.git] / src / environment.h
index bb1da2461e7baa2c55b28dbe2cce78efd5b24b0e..0cc53f9a6dccea2dc8f215f720def5f275a2288e 100644 (file)
@@ -205,9 +205,7 @@ class ServerEnvironment : public Environment
                { return m_gamedef; }
 
        float getSendRecommendedInterval()
-       {
-               return 0.10;
-       }
+               { return m_recommended_send_interval; }
 
        /*
                Save players
@@ -312,7 +310,7 @@ class ServerEnvironment : public Environment
                Returns the id of the object.
                Returns 0 if not added and thus deleted.
        */
-       u16 addActiveObjectRaw(ServerActiveObject *object, bool set_changed);
+       u16 addActiveObjectRaw(ServerActiveObject *object, bool set_changed, u32 dtime_s);
        
        /*
                Remove all objects that satisfy (m_removed && m_known_by_count==0)
@@ -322,7 +320,7 @@ class ServerEnvironment : public Environment
        /*
                Convert stored objects from block to active
        */
-       void activateObjects(MapBlock *block);
+       void activateObjects(MapBlock *block, u32 dtime_s);
        
        /*
                Convert objects that are not in active blocks to static.
@@ -367,6 +365,8 @@ class ServerEnvironment : public Environment
        // A helper variable for incrementing the latter
        float m_game_time_fraction_counter;
        core::list<ABMWithState> m_abms;
+       // An interval for generally sending object positions and stuff
+       float m_recommended_send_interval;
 };
 
 #ifndef SERVER
@@ -463,6 +463,8 @@ class ClientEnvironment : public Environment
        
        // Get event from queue. CEE_NONE is returned if queue is empty.
        ClientEnvEvent getClientEvent();
+
+       std::vector<core::vector2d<int> > attachment_list; // X is child ID, Y is parent ID
        
 private:
        ClientMap *m_map;