legacymode: prevent dropping from server when fps too high

This commit is contained in:
mittorn 2019-02-24 02:48:22 +07:00
parent ee4744e7cd
commit 8b5c5826a8
2 changed files with 2 additions and 1 deletions

View File

@ -796,7 +796,7 @@ void CL_WritePacket( void )
newcmds = ( cls.netchan.outgoing_sequence - cls.lastoutgoingcommand );
// put an upper/lower bound on this
newcmds = bound( 0, newcmds, 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 );

View File

@ -260,5 +260,6 @@ extern const char *clc_strings[clc_lastmsg+1];
#define MAX_LEGACY_WEAPON_BITS 5
#define MAX_LEGACY_MODEL_BITS 11
#define MAX_LEGACY_SERVERS 32
#define MAX_LEGACY_TOTAL_CMDS 28 // magic number from old engine's sv_client.c
#endif//NET_PROTOCOL_H