]> git.lizzy.rs Git - minetest.git/blobdiff - src/serverobject.h
make ret variable in /builtin/mainmenu/tab_credits.lua local (#5942)
[minetest.git] / src / serverobject.h
index 9e8b5a779f6b798bf48cc8ed4592c512bfc8ddb3..3041910d1598b48d822604249c7314a57b519781 100644 (file)
@@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef SERVEROBJECT_HEADER
 #define SERVEROBJECT_HEADER
 
+#include <unordered_set>
 #include "irrlichttypes_bloated.h"
 #include "activeobject.h"
 #include "inventorymanager.h"
@@ -119,10 +120,10 @@ class ServerActiveObject : public ActiveObject
                when it is created (converted from static to active - actually
                the data is the static form)
        */
-       virtual std::string getStaticData()
+       virtual void getStaticData(std::string *result) const
        {
                assert(isStaticAllowed());
-               return "";
+               *result = "";
        }
        /*
                Return false in here to never save and instead remove object
@@ -166,8 +167,8 @@ class ServerActiveObject : public ActiveObject
        {}
        virtual void removeAttachmentChild(int child_id)
        {}
-       virtual const UNORDERED_SET<int> &getAttachmentChildIds()
-       { static const UNORDERED_SET<int> rv; return rv; }
+       virtual const std::unordered_set<int> &getAttachmentChildIds()
+       { static const std::unordered_set<int> rv; return rv; }
        virtual ObjectProperties* accessObjectProperties()
        { return NULL; }
        virtual void notifyObjectPropertiesModified()
@@ -251,7 +252,7 @@ class ServerActiveObject : public ActiveObject
 
        ServerEnvironment *m_env;
        v3f m_base_position;
-       UNORDERED_SET<u32> m_attached_particle_spawners;
+       std::unordered_set<u32> m_attached_particle_spawners;
 
 private:
        // Used for creating objects based on type