From 9d9b671cc77440e9b3bfcd74288f09a720c0ee6b Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Wed, 3 Jun 2009 18:18:55 +0000 Subject: Don't cap maxmsglen on loopback connections. Use seperate buffer for stuffcmd processing on client so that something like ‘map foobar;wait;wait;wait;give shells’ works (original Q2 used deferred buffer for this). Don't include netgraph code into release builds. Made ‘changing’ and ‘precache’ commands not available from console, since they may confuse the client when typed manually. Client now handles newlines embedded into ‘cstring’ and ‘cstring2’ layout commands properly. Fixed a crash when displaying inventory. Detect zero bytes embedded into config files and refuse to execute them. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/net_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/net_common.c') diff --git a/source/net_common.c b/source/net_common.c index de30e7a..59d7a44 100644 --- a/source/net_common.c +++ b/source/net_common.c @@ -1007,7 +1007,7 @@ static void NET_OpenServer( void ) { if( saved_port && saved_port != net_port->integer ) { // revert to the last valid port Com_Printf( "Reverting to the last valid port %d...\n", saved_port ); - Cbuf_AddText( va( "set net_port %d\n", saved_port ) ); + Cbuf_AddText( &cmd_buffer, va( "set net_port %d\n", saved_port ) ); return; } @@ -1040,7 +1040,7 @@ static void NET_OpenClient( void ) { ( struct sockaddr * )&address, &length ); Com_WPrintf( "Client bound to UDP port %d.\n", ntohs( address.sin_port ) ); - Cvar_SetByVar( net_clientport, va( "%d", PORT_ANY ), CVAR_SET_DIRECT ); + Cvar_SetByVar( net_clientport, va( "%d", PORT_ANY ), FROM_CODE ); return; } } @@ -1618,10 +1618,10 @@ static size_t NET_DnRate_m( char *buffer, size_t size ) { static void net_udp_param_changed( cvar_t *self ) { // keep TCP socket vars in sync unless modified by user if( !( net_tcp_ip->flags & CVAR_MODIFIED ) ) { - Cvar_SetByVar( net_tcp_ip, net_ip->string, CVAR_SET_DIRECT ); + Cvar_SetByVar( net_tcp_ip, net_ip->string, FROM_CODE ); } if( !( net_tcp_port->flags & CVAR_MODIFIED ) ) { - Cvar_SetByVar( net_tcp_port, net_port->string, CVAR_SET_DIRECT ); + Cvar_SetByVar( net_tcp_port, net_port->string, FROM_CODE ); } NET_Restart_f(); -- cgit v1.2.3