Lower max packet size, remove duplicated server_name, server_contact and server_desc fields
This commit is contained in:
parent
13a82ca079
commit
e9361d5f33
3 changed files with 3 additions and 13 deletions
|
|
@ -1325,10 +1325,6 @@ static boolean SV_SendServerConfig(INT32 node)
|
|||
|
||||
memcpy(netbuffer->u.servercfg.server_context, server_context, 8);
|
||||
|
||||
strncpy(netbuffer->u.servercfg.server_name, cv_servername.string, MAXSERVERNAME);
|
||||
strncpy(netbuffer->u.servercfg.server_contact, cv_server_contact.string, MAXSERVERCONTACT);
|
||||
strncpy(netbuffer->u.servercfg.server_description, connectedserverdescription, MAXSERVERDESCRIPTION);
|
||||
|
||||
{
|
||||
const size_t len = sizeof (serverconfig_pak);
|
||||
|
||||
|
|
@ -4776,6 +4772,8 @@ static void HandleConnect(SINT8 node)
|
|||
/// \todo fix this !!!
|
||||
return; // restart the while
|
||||
}
|
||||
|
||||
ServerInfoUpdateSend();
|
||||
//if (gamestate != GS_LEVEL) // GS_INTERMISSION, etc?
|
||||
// SV_SendPlayerConfigs(node); // send bare minimum player info
|
||||
G_SetGamestate(backupstate);
|
||||
|
|
@ -5046,10 +5044,6 @@ static void PT_ServerCFG(SINT8 node)
|
|||
connectedtodedicated = netbuffer->u.servercfg.dedicated;
|
||||
|
||||
memcpy(server_context, netbuffer->u.servercfg.server_context, 8);
|
||||
|
||||
CopyCaretColors(connectedservername, netbuffer->u.servercfg.server_name, MAXSERVERNAME);
|
||||
CopyCaretColors(connectedservercontact, netbuffer->u.servercfg.server_contact, MAXSERVERCONTACT);
|
||||
strncpy(connectedserverdescription, netbuffer->u.servercfg.server_description, MAXSERVERDESCRIPTION);
|
||||
}
|
||||
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
|
|
|
|||
|
|
@ -261,10 +261,6 @@ struct serverconfig_pak
|
|||
UINT8 maxplayer;
|
||||
boolean allownewplayer;
|
||||
boolean discordinvites;
|
||||
|
||||
char server_name[MAXSERVERNAME];
|
||||
char server_contact[MAXSERVERCONTACT];
|
||||
char server_description[MAXSERVERDESCRIPTION];
|
||||
} ATTRPACK;
|
||||
|
||||
struct filetx_pak
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
/// \def MAXPACKETLENGTH
|
||||
/// For use in a LAN
|
||||
#define MAXPACKETLENGTH 4096
|
||||
#define MAXPACKETLENGTH 2063
|
||||
/// \def INETPACKETLENGTH
|
||||
/// For use on the internet
|
||||
#define INETPACKETLENGTH 1450
|
||||
|
|
|
|||
Loading…
Reference in a new issue