diff options
author | Andrey Nazarov <skuller@skuller.net> | 2009-06-03 18:18:55 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2009-06-03 18:18:55 +0000 |
commit | 9d9b671cc77440e9b3bfcd74288f09a720c0ee6b (patch) | |
tree | ecd94136c7742b1aab73f4e43f9e454cd0c63eba /source/net_common.c | |
parent | bd27c070620fdc96c5c3e222b3bfe43657ce90c2 (diff) |
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.
Diffstat (limited to 'source/net_common.c')
-rw-r--r-- | source/net_common.c | 8 |
1 files changed, 4 insertions, 4 deletions
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(); |