================== idAsyncClient::ProcessPureMessage ================== */
| 1473 | ================== |
| 1474 | */ |
| 1475 | void idAsyncClient::ProcessPureMessage( const netadr_t from, const idBitMsg &msg ) { |
| 1476 | idBitMsg outMsg; |
| 1477 | byte msgBuf[ MAX_MESSAGE_SIZE ]; |
| 1478 | int i; |
| 1479 | int inChecksums[ MAX_PURE_PAKS ]; |
| 1480 | |
| 1481 | if ( clientState != CS_CONNECTING ) { |
| 1482 | common->Printf( "clientState != CS_CONNECTING, pure msg ignored\n" ); |
| 1483 | return; |
| 1484 | } |
| 1485 | |
| 1486 | if ( !ValidatePureServerChecksums( from, msg ) ) { |
| 1487 | return; |
| 1488 | } |
| 1489 | |
| 1490 | fileSystem->GetPureServerChecksums( inChecksums ); |
| 1491 | outMsg.Init( msgBuf, sizeof( msgBuf ) ); |
| 1492 | outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID ); |
| 1493 | outMsg.WriteString( "pureClient" ); |
| 1494 | outMsg.WriteInt( serverChallenge ); |
| 1495 | outMsg.WriteShort( clientId ); |
| 1496 | i = 0; |
| 1497 | while ( inChecksums[ i ] ) { |
| 1498 | outMsg.WriteInt( inChecksums[ i++ ] ); |
| 1499 | } |
| 1500 | outMsg.WriteInt( 0 ); |
| 1501 | |
| 1502 | clientPort.SendPacket( from, outMsg.GetData(), outMsg.GetSize() ); |
| 1503 | } |
| 1504 | |
| 1505 | /* |
| 1506 | ================== |
nothing calls this directly
no test coverage detected