mirror of
https://github.com/LCEMP/LCEMP.git
synced 2026-06-05 02:34:41 +00:00
LCEMP v1.1.0, bugfixes, multithreading server, local leaderboard, performance fixes, and more
This commit is contained in:
@@ -500,7 +500,24 @@ void PlayerChunkMap::getChunkAndRemovePlayer(int x, int z, shared_ptr<ServerPlay
|
||||
void PlayerChunkMap::tickAddRequests(shared_ptr<ServerPlayer> player)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
const int maxPerTick = 10;
|
||||
int maxPerTick = 10;
|
||||
#if defined(_DEDICATED_SERVER)
|
||||
int activePlayers = (int)players.size();
|
||||
if (activePlayers < 1)
|
||||
{
|
||||
activePlayers = 1;
|
||||
}
|
||||
|
||||
maxPerTick = 48 / activePlayers;
|
||||
if (maxPerTick < 1)
|
||||
{
|
||||
maxPerTick = 1;
|
||||
}
|
||||
if (maxPerTick > 10)
|
||||
{
|
||||
maxPerTick = 10;
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
const int maxPerTick = 1;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user