mirror of
https://github.com/w23/xash3d-fwgs
synced 2025-01-20 15:50:15 +01: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 ));
|
||||
|
||||
// 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;
|
||||
|
||||
// clamp cmdrate
|
||||
@ -819,12 +819,13 @@ void CL_WritePacket( void )
|
||||
newcmds = ( cls.netchan.outgoing_sequence - cls.lastoutgoingcommand );
|
||||
|
||||
// put an upper/lower bound on this
|
||||
newcmds = bound( 0, newcmds, cls.legacymode?MAX_LEGACY_TOTAL_CMDS:MAX_TOTAL_CMDS );
|
||||
newcmds = bound( 0, newcmds, cls.legacymode ? MAX_LEGACY_TOTAL_CMDS: MAX_TOTAL_CMDS );
|
||||
if( cls.state == ca_connected ) newcmds = 0;
|
||||
|
||||
MSG_WriteByte( &buf, newcmds );
|
||||
|
||||
numcmds = newcmds + numbackup;
|
||||
|
||||
from = -1;
|
||||
|
||||
for( i = numcmds - 1; i >= 0; i-- )
|
||||
|
@ -298,7 +298,8 @@ extern const char *clc_strings[clc_lastmsg+1];
|
||||
#define SND_LEGACY_LARGE_INDEX (1<<2) // a send sound as short
|
||||
#define MAX_LEGACY_ENTITY_BITS 12
|
||||
#define MAX_LEGACY_WEAPON_BITS 5
|
||||
#define MAX_LEGACY_MODEL_BITS 11
|
||||
#define MAX_LEGACY_TOTAL_CMDS 28 // magic number from old engine's sv_client.c
|
||||
#define MAX_LEGACY_MODEL_BITS 11
|
||||
#define MAX_LEGACY_TOTAL_CMDS 16 // 28 - 16 = 12 real legacy max backup
|
||||
#define MAX_LEGACY_BACKUP_CMDS 12
|
||||
|
||||
#endif//NET_PROTOCOL_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user