Browse Source

legacymode: prevent dropping from server when fps too high

pull/2/head
mittorn 6 years ago
parent
commit
8b5c5826a8
  1. 2
      engine/client/cl_main.c
  2. 1
      engine/common/protocol.h

2
engine/client/cl_main.c

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

1
engine/common/protocol.h

@ -260,5 +260,6 @@ extern const char *clc_strings[clc_lastmsg+1];
#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_SERVERS 32 #define MAX_LEGACY_SERVERS 32
#define MAX_LEGACY_TOTAL_CMDS 28 // magic number from old engine's sv_client.c
#endif//NET_PROTOCOL_H #endif//NET_PROTOCOL_H

Loading…
Cancel
Save