- Improve snapshot rate and data rate control
- Make server send packet fragments and queued packets when server is idle - Voip protocol detection is tied to com_protocol making past-end-of-message reading unncessary - Use Hunk_AllocateTempMemory() for buffering VOIP packets and fix buffering scheme that ryan hates so much - Disable packet scrambling for new protocol as it is useless now - Get rid of the old packet scrambling functions predating latest point release - Use Hunk_AllocateTempMemory() for netchan packet queue to fix memory leak when client gets disconnected with packets in the queue - Use Hunk_AllocateTempMemory() for download blocks to fix memory leak when client gets disconnected with download blocks in the queue - Fix SV_RateMsec to account for udp/udp6 packet lengths
This commit is contained in:
parent
a844c94af1
commit
ac30d86db0
15 changed files with 345 additions and 356 deletions
|
@ -34,7 +34,6 @@ char *svc_strings[256] = {
|
|||
"svc_download",
|
||||
"svc_snapshot",
|
||||
"svc_EOF",
|
||||
"svc_extension",
|
||||
"svc_voip",
|
||||
};
|
||||
|
||||
|
@ -330,10 +329,6 @@ void CL_ParseSnapshot( msg_t *msg ) {
|
|||
int cl_connectedToPureServer;
|
||||
int cl_connectedToCheatServer;
|
||||
|
||||
#ifdef USE_VOIP
|
||||
int cl_connectedToVoipServer;
|
||||
#endif
|
||||
|
||||
/*
|
||||
==================
|
||||
CL_SystemInfoChanged
|
||||
|
@ -363,14 +358,18 @@ void CL_SystemInfoChanged( void ) {
|
|||
}
|
||||
|
||||
#ifdef USE_VOIP
|
||||
// in the future, (val) will be a protocol version string, so only
|
||||
// accept explicitly 1, not generally non-zero.
|
||||
s = Info_ValueForKey( systemInfo, "sv_voip" );
|
||||
if ( Cvar_VariableValue( "g_gametype" ) == GT_SINGLE_PLAYER || Cvar_VariableValue("ui_singlePlayerActive"))
|
||||
cl_connectedToVoipServer = qfalse;
|
||||
#ifdef LEGACY_PROTOCOL
|
||||
if(clc.compat)
|
||||
clc.voipEnabled = qfalse;
|
||||
else
|
||||
cl_connectedToVoipServer = (atoi( s ) == 1);
|
||||
|
||||
#endif
|
||||
{
|
||||
s = Info_ValueForKey( systemInfo, "sv_voip" );
|
||||
if ( Cvar_VariableValue( "g_gametype" ) == GT_SINGLE_PLAYER || Cvar_VariableValue("ui_singlePlayerActive"))
|
||||
clc.voipEnabled = qfalse;
|
||||
else
|
||||
clc.voipEnabled = atoi(s);
|
||||
}
|
||||
#endif
|
||||
|
||||
s = Info_ValueForKey( systemInfo, "sv_cheats" );
|
||||
|
@ -865,19 +864,6 @@ void CL_ParseServerMessage( msg_t *msg ) {
|
|||
|
||||
cmd = MSG_ReadByte( msg );
|
||||
|
||||
// See if this is an extension command after the EOF, which means we
|
||||
// got data that a legacy client should ignore.
|
||||
if ((cmd == svc_EOF) && (MSG_LookaheadByte( msg ) == svc_extension)) {
|
||||
SHOWNET( msg, "EXTENSION" );
|
||||
MSG_ReadByte( msg ); // throw the svc_extension byte away.
|
||||
cmd = MSG_ReadByte( msg ); // something legacy clients can't do!
|
||||
// sometimes you get a svc_extension at end of stream...dangling
|
||||
// bits in the huffman decoder giving a bogus value?
|
||||
if (cmd == -1) {
|
||||
cmd = svc_EOF;
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd == svc_EOF) {
|
||||
SHOWNET( msg, "END OF MESSAGE" );
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue