mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 13:51:31 +00:00
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:
parent
c96f5dba0c
commit
935fec1e15
3 changed files with 12 additions and 3 deletions
|
@ -1428,8 +1428,14 @@ static void SV_SendPlayerInfo(INT32 node)
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
netbuffer->packettype = PT_PLAYERINFO;
|
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])
|
if (!playeringame[i])
|
||||||
{
|
{
|
||||||
netbuffer->u.playerinfo[i].node = 255; // This slot is empty.
|
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;
|
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
|
/** Sends a PT_SERVERCFG packet
|
||||||
|
|
|
@ -468,7 +468,7 @@ typedef struct
|
||||||
serverrefuse_pak serverrefuse; // 65025 bytes (somehow I feel like those values are garbage...)
|
serverrefuse_pak serverrefuse; // 65025 bytes (somehow I feel like those values are garbage...)
|
||||||
askinfo_pak askinfo; // 61 bytes
|
askinfo_pak askinfo; // 61 bytes
|
||||||
msaskinfo_pak msaskinfo; // 22 bytes
|
msaskinfo_pak msaskinfo; // 22 bytes
|
||||||
plrinfo playerinfo[MAXPLAYERS]; // 576 bytes(?)
|
plrinfo playerinfo[MSCOMPAT_MAXPLAYERS];// 576 bytes(?)
|
||||||
plrconfig playerconfig[MAXPLAYERS]; // (up to) 528 bytes(?)
|
plrconfig playerconfig[MAXPLAYERS]; // (up to) 528 bytes(?)
|
||||||
INT32 filesneedednum; // 4 bytes
|
INT32 filesneedednum; // 4 bytes
|
||||||
filesneededconfig_pak filesneededcfg; // ??? bytes
|
filesneededconfig_pak filesneededcfg; // ??? bytes
|
||||||
|
|
|
@ -252,6 +252,9 @@ extern FILE *logstream;
|
||||||
#define PLAYERSMASK (MAXPLAYERS-1)
|
#define PLAYERSMASK (MAXPLAYERS-1)
|
||||||
#define MAXPLAYERNAME 21
|
#define MAXPLAYERNAME 21
|
||||||
|
|
||||||
|
// Master Server compatibility ONLY
|
||||||
|
#define MSCOMPAT_MAXPLAYERS (32)
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
SKINCOLOR_NONE = 0,
|
SKINCOLOR_NONE = 0,
|
||||||
|
|
Loading…
Reference in a new issue