Browse Source

engine: common: fix warning about read-only cvar. In fact, we should force set them.

pull/2/head
Alibek Omarov 1 year ago
parent
commit
b39378a6da
  1. 2
      engine/common/net_chan.c
  2. 4
      engine/common/net_ws.c

2
engine/common/net_chan.c

@ -254,7 +254,7 @@ void Netchan_Init( void ) @@ -254,7 +254,7 @@ void Netchan_Init( void )
Cvar_RegisterVariable( &net_chokeloop );
Cvar_RegisterVariable( &net_showdrop );
Cvar_RegisterVariable( &net_qport );
Cvar_DirectSet( &net_qport, buf );
Cvar_FullSet( net_qport.name, buf, net_qport.flags );
net_mempool = Mem_AllocPool( "Network Pool" );

4
engine/common/net_ws.c

@ -2111,10 +2111,10 @@ void NET_Init( void ) @@ -2111,10 +2111,10 @@ void NET_Init( void )
Cvar_RegisterVariable( &net_fakeloss );
Q_snprintf( cmd, sizeof( cmd ), "%i", PORT_SERVER );
Cvar_DirectSet( &net_hostport, cmd );
Cvar_FullSet( "hostport", cmd, FCVAR_READ_ONLY );
Q_snprintf( cmd, sizeof( cmd ), "%i", PORT_CLIENT );
Cvar_DirectSet( &net_clientport, cmd );
Cvar_FullSet( "clientport", cmd, FCVAR_READ_ONLY );
// cvar equivalents for IPv6
Cvar_RegisterVariable( &net_ip6name );

Loading…
Cancel
Save