X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fclientiface.h;h=5335fa6442ac601066bb27cc8c65adbc039492b1;hb=5f1cd555cd9d1c64426e173b30b5b792d211c835;hp=6ba9ec73461999420593698499ad3dd7f2d6f289;hpb=ad7daf7b52348e1b71aa803be10de5b2134cba11;p=oweals%2Fminetest.git diff --git a/src/clientiface.h b/src/clientiface.h index 6ba9ec734..5335fa644 100644 --- a/src/clientiface.h +++ b/src/clientiface.h @@ -246,7 +246,7 @@ public: bool isMechAllowed(AuthMechanism mech) { return allowed_auth_mechs & mech; } - RemoteClient() = default; + RemoteClient(); ~RemoteClient() = default; /* @@ -274,6 +274,11 @@ public: 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. @@ -354,6 +359,13 @@ private: v3s16 m_last_center; float m_nearest_unsent_reset_timer = 0.0f; + const u16 m_max_simul_sends; + const float m_min_time_from_building; + const s16 m_max_send_distance; + const s16 m_block_optimize_distance; + const s16 m_max_gen_distance; + const bool m_occ_cull; + /* Blocks that are currently on the line. This is used for throttling the sending of blocks. @@ -422,7 +434,10 @@ public: void step(float dtime); /* get list of active client id's */ - std::vector getClientIDs(ClientState min_state=CS_Active); + std::vector getClientIDs(ClientState min_state=CS_Active); + + /* mark block as not sent to active client sessions */ + void markBlockposAsNotSent(const v3s16 &pos); /* verify is server user limit was reached */ bool isUserLimitReached();