================== idAsyncClient::GetNETServers ================== */
| 382 | ================== |
| 383 | */ |
| 384 | void idAsyncClient::GetNETServers( void ) { |
| 385 | idBitMsg msg; |
| 386 | byte msgBuf[MAX_MESSAGE_SIZE]; |
| 387 | |
| 388 | idAsyncNetwork::LANServer.SetBool( false ); |
| 389 | |
| 390 | // NetScan only clears GUI and results, not the stored list |
| 391 | serverList.Clear( ); |
| 392 | serverList.NetScan( ); |
| 393 | serverList.StartServers( true ); |
| 394 | |
| 395 | msg.Init( msgBuf, sizeof( msgBuf ) ); |
| 396 | msg.WriteShort( CONNECTIONLESS_MESSAGE_ID ); |
| 397 | msg.WriteString( "getServers" ); |
| 398 | msg.WriteInt( ASYNC_PROTOCOL_VERSION ); |
| 399 | msg.WriteString( cvarSystem->GetCVarString( "fs_game" ) ); |
| 400 | msg.WriteBits( cvarSystem->GetCVarInteger( "gui_filter_password" ), 2 ); |
| 401 | msg.WriteBits( cvarSystem->GetCVarInteger( "gui_filter_players" ), 2 ); |
| 402 | msg.WriteBits( cvarSystem->GetCVarInteger( "gui_filter_gameType" ), 2 ); |
| 403 | |
| 404 | netadr_t adr; |
| 405 | if ( idAsyncNetwork::GetMasterAddress( 0, adr ) ) { |
| 406 | clientPort.SendPacket( adr, msg.GetData(), msg.GetSize() ); |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | /* |
| 411 | ================== |
nothing calls this directly
no test coverage detected