]> git.lizzy.rs Git - minetest.git/blobdiff - src/serverobject.h
client.cpp: modernize code
[minetest.git] / src / serverobject.h
index 3041910d1598b48d822604249c7314a57b519781..8acbd6a19c5cad36b70d777bec1263f5c89b2bfe 100644 (file)
@@ -78,7 +78,7 @@ class ServerActiveObject : public ActiveObject
        /*
                Some simple getters/setters
        */
-       v3f getBasePosition(){ return m_base_position; }
+       v3f getBasePosition() const { return m_base_position; }
        void setBasePosition(v3f pos){ m_base_position = pos; }
        ServerEnvironment* getEnv(){ return m_env; }
 
@@ -204,7 +204,7 @@ class ServerActiveObject : public ActiveObject
                deleted until this is 0 to keep the id preserved for the right
                object.
        */
-       u16 m_known_by_count;
+       u16 m_known_by_count = 0;
 
        /*
                - Whether this object is to be removed when nobody knows about
@@ -215,7 +215,7 @@ class ServerActiveObject : public ActiveObject
                  to be deleted.
                - This can be set to true by anything else too.
        */
-       bool m_removed;
+       bool m_removed = false;
 
        /*
                This is set to true when an object should be removed from the active
@@ -226,17 +226,17 @@ class ServerActiveObject : public ActiveObject
                m_known_by_count is true, object is deleted from the active object
                list.
        */
-       bool m_pending_deactivation;
+       bool m_pending_deactivation = false;
 
        /*
                Whether the object's static data has been stored to a block
        */
-       bool m_static_exists;
+       bool m_static_exists = false;
        /*
                The block from which the object was loaded from, and in which
                a copy of the static data resides.
        */
-       v3s16 m_static_block;
+       v3s16 m_static_block = v3s16(1337,1337,1337);
 
        /*
                Queue of messages to be sent to the client