Fix compatibility with the MS (Specifically Doomseeker)

Send back 32 players worth of playerinfo regardless of MAXPLAYERS. Fill the extra with unconnected nodes.
This commit is contained in:
Sryder 2019-06-17 20:57:31 +01:00
parent c96f5dba0c
commit 935fec1e15
3 changed files with 12 additions and 3 deletions

View File

@ -1428,8 +1428,14 @@ static void SV_SendPlayerInfo(INT32 node)
UINT8 i;
netbuffer->packettype = PT_PLAYERINFO;
for (i = 0; i < MAXPLAYERS; i++)
for (i = 0; i < MSCOMPAT_MAXPLAYERS; i++)
{
if (i >= MAXPLAYERS)
{
netbuffer->u.playerinfo[i].node = 255;
continue;
}
if (!playeringame[i])
{
netbuffer->u.playerinfo[i].node = 255; // This slot is empty.
@ -1477,7 +1483,7 @@ static void SV_SendPlayerInfo(INT32 node)
netbuffer->u.playerinfo[i].data |= 0x80;
}
HSendPacket(node, false, 0, sizeof(plrinfo) * MAXPLAYERS);
HSendPacket(node, false, 0, sizeof(plrinfo) * MSCOMPAT_MAXPLAYERS);
}
/** Sends a PT_SERVERCFG packet

View File

@ -468,7 +468,7 @@ typedef struct
serverrefuse_pak serverrefuse; // 65025 bytes (somehow I feel like those values are garbage...)
askinfo_pak askinfo; // 61 bytes
msaskinfo_pak msaskinfo; // 22 bytes
plrinfo playerinfo[MAXPLAYERS]; // 576 bytes(?)
plrinfo playerinfo[MSCOMPAT_MAXPLAYERS];// 576 bytes(?)
plrconfig playerconfig[MAXPLAYERS]; // (up to) 528 bytes(?)
INT32 filesneedednum; // 4 bytes
filesneededconfig_pak filesneededcfg; // ??? bytes

View File

@ -252,6 +252,9 @@ extern FILE *logstream;
#define PLAYERSMASK (MAXPLAYERS-1)
#define MAXPLAYERNAME 21
// Master Server compatibility ONLY
#define MSCOMPAT_MAXPLAYERS (32)
typedef enum
{
SKINCOLOR_NONE = 0,