mirror of
https://github.com/LCEMP/LCEMP.git
synced 2026-04-23 15:33:58 +00:00
update max player values
This commit is contained in:
parent
f1f6930783
commit
98794efd06
|
|
@ -59,6 +59,7 @@ char g_Win64MultiplayerIP[256] = "127.0.0.1";
|
|||
|
||||
bool g_ServerAdvertiseLAN = true;
|
||||
char g_ServerBindAddress[256] = "";
|
||||
int g_ServerMaxPlayers = MINECRAFT_NET_MAX_PLAYERS;
|
||||
|
||||
bool WinsockNetLayer::Initialize()
|
||||
{
|
||||
|
|
@ -573,7 +574,7 @@ DWORD WINAPI WinsockNetLayer::AcceptThreadProc(LPVOID 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++;
|
||||
}
|
||||
|
|
@ -816,7 +817,7 @@ bool WinsockNetLayer::StartAdvertising(int gamePort, const wchar_t *hostName, un
|
|||
s_advertiseData.gamePort = (WORD)gamePort;
|
||||
wcsncpy_s(s_advertiseData.hostName, 32, hostName, _TRUNCATE);
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,11 @@
|
|||
#pragma comment(lib, "Ws2_32.lib")
|
||||
|
||||
#define WIN64_NET_DEFAULT_PORT 25565
|
||||
#ifdef _DEDICATED_SERVER
|
||||
#define WIN64_NET_MAX_CLIENTS 31
|
||||
#else
|
||||
#define WIN64_NET_MAX_CLIENTS 7
|
||||
#endif
|
||||
#define WIN64_NET_RECV_BUFFER_SIZE 65536
|
||||
#define WIN64_NET_MAX_PACKET_SIZE (3 * 1024 * 1024)
|
||||
#define WIN64_LAN_DISCOVERY_PORT 25566
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 2b492ad8cec1aa8a862694ab89396338eac9afcd
|
||||
Subproject commit db5a8c90898c094e04ba85aeea12028ccf76b088
|
||||
Loading…
Reference in a new issue