summaryrefslogtreecommitdiff
path: root/src/serverenvironment.h
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2017-09-09 00:36:48 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-09-09 00:36:48 +0200
commit745a90dc84339774a37fddff480dd60c69f4cc2a (patch)
treeb856c29bd9fb13f31c3349866f2de9624bf56a3e /src/serverenvironment.h
parent1105a14bccefb48a0e264fe19190c39629259338 (diff)
downloadminetest-745a90dc84339774a37fddff480dd60c69f4cc2a.tar.gz
minetest-745a90dc84339774a37fddff480dd60c69f4cc2a.tar.bz2
minetest-745a90dc84339774a37fddff480dd60c69f4cc2a.zip
Server: Calculate maximal total block sends dynamically (#6393)
The block sends per client is 1/2 when reaching the maximal player count.
Diffstat (limited to 'src/serverenvironment.h')
-rw-r--r--src/serverenvironment.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/serverenvironment.h b/src/serverenvironment.h
index 9d84d7a48..0eabfc08f 100644
--- a/src/serverenvironment.h
+++ b/src/serverenvironment.h
@@ -342,6 +342,7 @@ public:
RemotePlayer *getPlayer(const u16 peer_id);
RemotePlayer *getPlayer(const char* name);
+ u32 getPlayerCount() const { return m_players.size(); }
static bool migratePlayersDatabase(const GameParams &game_params,
const Settings &cmd_args);