mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-30 16:54:29 +00:00
engine: client: tune max commands/max backup commands values for legacy protocol
This commit is contained in:
parent
591d572870
commit
93b2f535e2
@ -739,7 +739,7 @@ void CL_WritePacket( void )
|
|||||||
MSG_Init( &buf, "ClientData", data, sizeof( data ));
|
MSG_Init( &buf, "ClientData", data, sizeof( data ));
|
||||||
|
|
||||||
// Determine number of backup commands to send along
|
// Determine number of backup commands to send along
|
||||||
numbackup = bound( 0, cl_cmdbackup->value, MAX_BACKUP_COMMANDS );
|
numbackup = bound( 0, cl_cmdbackup->value, cls.legacymode ? MAX_LEGACY_BACKUP_CMDS : MAX_BACKUP_COMMANDS );
|
||||||
if( cls.state == ca_connected ) numbackup = 0;
|
if( cls.state == ca_connected ) numbackup = 0;
|
||||||
|
|
||||||
// clamp cmdrate
|
// clamp cmdrate
|
||||||
@ -825,6 +825,7 @@ void CL_WritePacket( void )
|
|||||||
MSG_WriteByte( &buf, newcmds );
|
MSG_WriteByte( &buf, newcmds );
|
||||||
|
|
||||||
numcmds = newcmds + numbackup;
|
numcmds = newcmds + numbackup;
|
||||||
|
|
||||||
from = -1;
|
from = -1;
|
||||||
|
|
||||||
for( i = numcmds - 1; i >= 0; i-- )
|
for( i = numcmds - 1; i >= 0; i-- )
|
||||||
|
@ -299,6 +299,7 @@ extern const char *clc_strings[clc_lastmsg+1];
|
|||||||
#define MAX_LEGACY_ENTITY_BITS 12
|
#define MAX_LEGACY_ENTITY_BITS 12
|
||||||
#define MAX_LEGACY_WEAPON_BITS 5
|
#define MAX_LEGACY_WEAPON_BITS 5
|
||||||
#define MAX_LEGACY_MODEL_BITS 11
|
#define MAX_LEGACY_MODEL_BITS 11
|
||||||
#define MAX_LEGACY_TOTAL_CMDS 28 // magic number from old engine's sv_client.c
|
#define MAX_LEGACY_TOTAL_CMDS 16 // 28 - 16 = 12 real legacy max backup
|
||||||
|
#define MAX_LEGACY_BACKUP_CMDS 12
|
||||||
|
|
||||||
#endif//NET_PROTOCOL_H
|
#endif//NET_PROTOCOL_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user