]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/environment.h
Slightly improved version of mystrtok_r
[dragonfireclient.git] / src / environment.h
index 0422290388b1f19859fd77320bf56d4611237987..d1e61967fd2b10e813868289e2dfc986d5447805 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
@@ -243,8 +241,9 @@ class ServerEnvironment : public Environment
                MapBlock.
                Caller allocates memory, ServerEnvironment frees memory.
                Return value: true if succeeded, false if failed.
+               (note:  not used, pending removal from engine)
        */
-       bool addActiveObjectAsStatic(ServerActiveObject *object);
+       //bool addActiveObjectAsStatic(ServerActiveObject *object);
        
        /*
                Find out what new objects have been added to
@@ -285,6 +284,10 @@ class ServerEnvironment : public Environment
                Other stuff
                -------------------------------------------
        */
+
+       // Script-aware node setters
+       bool setNode(v3s16 p, const MapNode &n);
+       bool removeNode(v3s16 p);
        
        // Find all active objects inside a radius around a point
        std::set<u16> getObjectsInsideRadius(v3f pos, float radius);
@@ -367,6 +370,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 +468,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;