projects
/
oweals
/
minetest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move client-specific files to 'src/client' (#7902)
[oweals/minetest.git]
/
src
/
clientiface.h
diff --git
a/src/clientiface.h
b/src/clientiface.h
index 6ba9ec73461999420593698499ad3dd7f2d6f289..5335fa6442ac601066bb27cc8c65adbc039492b1 100644
(file)
--- a/
src/clientiface.h
+++ b/
src/clientiface.h
@@
-246,7
+246,7
@@
public:
bool isMechAllowed(AuthMechanism mech)
{ return allowed_auth_mechs & mech; }
bool isMechAllowed(AuthMechanism mech)
{ return allowed_auth_mechs & mech; }
- RemoteClient()
= default
;
+ RemoteClient();
~RemoteClient() = default;
/*
~RemoteClient() = default;
/*
@@
-274,6
+274,11
@@
public:
u32 getSendingCount() const { return m_blocks_sending.size(); }
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.
// 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;
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.
/*
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 */
void step(float dtime);
/* get list of active client id's */
- std::vector<u16> getClientIDs(ClientState min_state=CS_Active);
+ std::vector<session_t> 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();
/* verify is server user limit was reached */
bool isUserLimitReached();