Max players from 8 -> 255 + small connection optimizations (#722)

* Multiplayer 8 to max byte increase.

Made-with: Cursor

* Server chunk optimizations for large player counts, server full notification fix, added to server.properties.
This commit is contained in:
Kevin
2026-03-06 19:23:32 -06:00
committed by GitHub
parent 16446265d5
commit 13960a93b2
16 changed files with 294 additions and 145 deletions

View File

@@ -136,7 +136,9 @@ void PendingConnection::sendPreLoginResponse()
else
#endif
{
connection->send( shared_ptr<PreLoginPacket>( new PreLoginPacket(L"-", ugcXuids, ugcXuidCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion,szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),hostIndex, server->m_texturePackId) ) );
DWORD cappedCount = (ugcXuidCount > 255u) ? 255u : static_cast<DWORD>(ugcXuidCount);
BYTE cappedHostIndex = (hostIndex >= 255u) ? 254 : static_cast<BYTE>(hostIndex);
connection->send( shared_ptr<PreLoginPacket>( new PreLoginPacket(L"-", ugcXuids, cappedCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion,szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),cappedHostIndex, server->m_texturePackId) ) );
}
}