Skip to content

Commit

Permalink
engine: common: fix warning about read-only cvar. In fact, we should …
Browse files Browse the repository at this point in the history
…force set them.
  • Loading branch information
a1batross committed Jul 22, 2023
1 parent 5c6b9d3 commit b39378a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion engine/common/net_chan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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" );

Expand Down
4 changes: 2 additions & 2 deletions engine/common/net_ws.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit b39378a

Please sign in to comment.