mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCEMP-Server.git
synced 2026-05-22 14:46:10 +00:00
fix max players
This commit is contained in:
@@ -73,6 +73,7 @@ char g_Win64MultiplayerIP[256] = "127.0.0.1";
|
||||
|
||||
bool g_ServerAdvertiseLAN = true;
|
||||
char g_ServerBindAddress[256] = "";
|
||||
int g_ServerMaxPlayers = MINECRAFT_NET_MAX_PLAYERS;
|
||||
|
||||
static void InitMutex(pthread_mutex_t* m)
|
||||
{
|
||||
@@ -560,7 +561,7 @@ void* WinsockNetLayer::AcceptThreadProc(void* /*param*/)
|
||||
assignedSmallId = s_freeSmallIds.back();
|
||||
s_freeSmallIds.pop_back();
|
||||
}
|
||||
else if (s_nextSmallId < MINECRAFT_NET_MAX_PLAYERS)
|
||||
else if (s_nextSmallId < g_ServerMaxPlayers)
|
||||
{
|
||||
assignedSmallId = s_nextSmallId++;
|
||||
}
|
||||
@@ -799,7 +800,7 @@ bool WinsockNetLayer::StartAdvertising(int gamePort, const wchar_t *hostName, un
|
||||
for (int i = 0; i < 31 && hostName[i] != L'\0'; i++)
|
||||
s_advertiseData.hostName[i] = (uint16_t)hostName[i];
|
||||
s_advertiseData.playerCount = 1;
|
||||
s_advertiseData.maxPlayers = MINECRAFT_NET_MAX_PLAYERS;
|
||||
s_advertiseData.maxPlayers = g_ServerMaxPlayers;
|
||||
s_advertiseData.gameHostSettings = gameSettings;
|
||||
s_advertiseData.texturePackParentId = texPackId;
|
||||
s_advertiseData.subTexturePackId = subTexId;
|
||||
|
||||
Reference in New Issue
Block a user