]> git.lizzy.rs Git - minetest.git/blobdiff - src/remoteplayer.h
Fix core.get_player_by_name() returning unusable ObjectRef
[minetest.git] / src / remoteplayer.h
index ed0f21b424c07432051664fea1533728f32ae8c3..831bfe956af7b21cb022be99b35ed29562c2ebab 100644 (file)
@@ -110,12 +110,7 @@ class RemotePlayer : public Player
 
        bool checkModified() const { return m_dirty || inventory.checkModified(); }
 
-       void setModified(const bool x)
-       {
-               m_dirty = x;
-               if (!x)
-                       inventory.setModified(x);
-       }
+       inline void setModified(const bool x) { m_dirty = x; }
 
        void setLocalAnimations(v2s32 frames[4], float frame_speed)
        {
@@ -135,10 +130,15 @@ class RemotePlayer : public Player
 
        u16 protocol_version = 0;
 
+       // v1 for clients older than 5.1.0-dev
+       u16 formspec_version = 1;
+
        session_t getPeerId() const { return m_peer_id; }
 
        void setPeerId(session_t peer_id) { m_peer_id = peer_id; }
 
+       void onSuccessfulSave();
+
 private:
        /*
                serialize() writes a bunch of text that can contain