engine: net_ws: allow setting custom client port
This commit is contained in:
parent
23b410ccb0
commit
75b69fbf85
1 changed files with 13 additions and 5 deletions
|
@ -2073,23 +2073,31 @@ void NET_Init( void )
|
||||||
|
|
||||||
// specify custom host port
|
// specify custom host port
|
||||||
if( Sys_GetParmFromCmdLine( "-port", cmd ) && Q_isdigit( cmd ))
|
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
|
// specify custom IPv6 host port
|
||||||
if( Sys_GetParmFromCmdLine( "-port6", cmd ) && Q_isdigit( cmd ))
|
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
|
// specify custom ip
|
||||||
if( Sys_GetParmFromCmdLine( "-ip", cmd ))
|
if( Sys_GetParmFromCmdLine( "-ip", cmd ))
|
||||||
Cvar_FullSet( "ip", cmd, net_ipname.flags );
|
Cvar_DirectSet( &net_ipname, cmd );
|
||||||
|
|
||||||
// specify custom ip6
|
// specify custom ip6
|
||||||
if( Sys_GetParmFromCmdLine( "-ip6", cmd ))
|
if( Sys_GetParmFromCmdLine( "-ip6", cmd ))
|
||||||
Cvar_FullSet( "ip6", cmd, net_ip6name.flags );
|
Cvar_DirectSet( &net_ip6name, cmd );
|
||||||
|
|
||||||
// adjust clockwindow
|
// adjust clockwindow
|
||||||
if( Sys_GetParmFromCmdLine( "-clockwindow", cmd ))
|
if( Sys_GetParmFromCmdLine( "-clockwindow", cmd ))
|
||||||
Cvar_SetValue( "clockwindow", Q_atof( cmd ));
|
Cvar_DirectSetValue( &net_clockwindow, Q_atof( cmd ));
|
||||||
|
|
||||||
net.sequence_number = 1;
|
net.sequence_number = 1;
|
||||||
net.initialized = true;
|
net.initialized = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue