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

@@ -98,12 +98,14 @@ private:
INetworkPlayer *m_pNetworkPlayer;
unsigned char *flags;
unsigned int count;
int m_smallId;
PlayerFlags(INetworkPlayer *pNetworkPlayer, unsigned int count);
~PlayerFlags();
};
vector<PlayerFlags *> m_playerFlags;
void SystemFlagAddPlayer(INetworkPlayer *pNetworkPlayer);
void SystemFlagRemovePlayer(INetworkPlayer *pNetworkPlayer);
void SystemFlagRemoveBySmallId(int smallId);
void SystemFlagReset();
public:
virtual void SystemFlagSet(INetworkPlayer *pNetworkPlayer, int index);
@@ -161,6 +163,9 @@ public:
virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam );
virtual void ForceFriendsSessionRefresh();
// Win64: used by accept thread to reject connections when server is at max players (so we don't assign smallId > max).
bool CanAcceptMoreConnections();
public:
void NotifyPlayerJoined( IQNetPlayer *pQNetPlayer );
void NotifyPlayerLeaving(IQNetPlayer* pQNetPlayer);