================== idAsyncServer::SendPureServerMessage ================== */
| 1555 | ================== |
| 1556 | */ |
| 1557 | bool idAsyncServer::SendPureServerMessage( const netadr_t to ) { |
| 1558 | idBitMsg outMsg; |
| 1559 | byte msgBuf[ MAX_MESSAGE_SIZE ]; |
| 1560 | int serverChecksums[ MAX_PURE_PAKS ]; |
| 1561 | int i; |
| 1562 | |
| 1563 | fileSystem->GetPureServerChecksums( serverChecksums ); |
| 1564 | if ( !serverChecksums[ 0 ] ) { |
| 1565 | // happens if you run fully expanded assets with si_pure 1 |
| 1566 | common->Warning( "pure server has no pak files referenced" ); |
| 1567 | return false; |
| 1568 | } |
| 1569 | common->DPrintf( "client %s: sending pure pak list\n", Sys_NetAdrToString( to ) ); |
| 1570 | |
| 1571 | // send our list of required paks |
| 1572 | outMsg.Init( msgBuf, sizeof( msgBuf ) ); |
| 1573 | outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID ); |
| 1574 | outMsg.WriteString( "pureServer" ); |
| 1575 | |
| 1576 | i = 0; |
| 1577 | while ( serverChecksums[ i ] ) { |
| 1578 | outMsg.WriteInt( serverChecksums[ i++ ] ); |
| 1579 | } |
| 1580 | outMsg.WriteInt( 0 ); |
| 1581 | |
| 1582 | serverPort.SendPacket( to, outMsg.GetData(), outMsg.GetSize() ); |
| 1583 | return true; |
| 1584 | } |
| 1585 | |
| 1586 | /* |
| 1587 | ================== |
nothing calls this directly
no test coverage detected