]> git.lizzy.rs Git - minetest.git/blobdiff - src/clientiface.h
Fix core.get_player_by_name() returning unusable ObjectRef
[minetest.git] / src / clientiface.h
index 291ccd4016f096c6d61c93355774a299ffbac756..bf95df4a8a126d079fbca266db2cf17dfd869159 100644 (file)
@@ -274,6 +274,11 @@ class RemoteClient
 
        u32 getSendingCount() const { return m_blocks_sending.size(); }
 
+       bool isBlockSent(v3s16 p) const
+       {
+               return m_blocks_sent.find(p) != m_blocks_sent.end();
+       }
+
        // Increments timeouts and removes timed-out blocks from list
        // NOTE: This doesn't fix the server-not-sending-block bug
        //       because it is related to emerging, not sending.
@@ -333,6 +338,7 @@ class RemoteClient
        u8 getMajor() const { return m_version_major; }
        u8 getMinor() const { return m_version_minor; }
        u8 getPatch() const { return m_version_patch; }
+       const std::string &getFull() const { return m_full_version; }
 private:
        // Version is stored in here after INIT before INIT2
        u8 m_pending_serialization_version = SER_FMT_VER_INVALID;
@@ -496,7 +502,7 @@ class ClientInterface {
 
        // Connection
        std::shared_ptr<con::Connection> m_con;
-       std::mutex m_clients_mutex;
+       std::recursive_mutex m_clients_mutex;
        // Connected clients (behind the con mutex)
        RemoteClientMap m_clients;
        std::vector<std::string> m_clients_names; //for announcing masterserver