diff --git a/engine/common/net_ws.c b/engine/common/net_ws.c index 21cc89ba..70e80c71 100644 --- a/engine/common/net_ws.c +++ b/engine/common/net_ws.c @@ -2073,23 +2073,31 @@ void NET_Init( void ) // specify custom host port if( Sys_GetParmFromCmdLine( "-port", cmd ) && Q_isdigit( cmd )) - Cvar_FullSet( "hostport", cmd, FCVAR_READ_ONLY ); + Cvar_FullSet( net_hostport.name, cmd, net_hostport.flags ); // specify custom IPv6 host port if( Sys_GetParmFromCmdLine( "-port6", cmd ) && Q_isdigit( cmd )) - Cvar_FullSet( "ip6_hostport", cmd, FCVAR_READ_ONLY ); + Cvar_FullSet( net_ip6hostport.name, cmd, net_ip6hostport.flags ); + + // specify custom client port + if( Sys_GetParmFromCmdLine( "-clientport", cmd ) && Q_isdigit( cmd )) + Cvar_FullSet( net_clientport.name, cmd, net_clientport.flags ); + + // specify custom IPv6 client port + if( Sys_GetParmFromCmdLine( "-clientport6", cmd ) && Q_isdigit( cmd )) + Cvar_FullSet( net_ip6clientport.name, cmd, net_ip6clientport.flags ); // specify custom ip if( Sys_GetParmFromCmdLine( "-ip", cmd )) - Cvar_FullSet( "ip", cmd, net_ipname.flags ); + Cvar_DirectSet( &net_ipname, cmd ); // specify custom ip6 if( Sys_GetParmFromCmdLine( "-ip6", cmd )) - Cvar_FullSet( "ip6", cmd, net_ip6name.flags ); + Cvar_DirectSet( &net_ip6name, cmd ); // adjust clockwindow if( Sys_GetParmFromCmdLine( "-clockwindow", cmd )) - Cvar_SetValue( "clockwindow", Q_atof( cmd )); + Cvar_DirectSetValue( &net_clockwindow, Q_atof( cmd )); net.sequence_number = 1; net.initialized = true;