MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / SendPureServerMessage

Method SendPureServerMessage

neo/framework/async/AsyncServer.cpp:1557–1584  ·  view source on GitHub ↗

================== idAsyncServer::SendPureServerMessage ================== */

Source from the content-addressed store, hash-verified

1555==================
1556*/
1557bool 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==================

Callers

nothing calls this directly

Calls 11

Sys_NetAdrToStringFunction · 0.50
WarningMethod · 0.45
DPrintfMethod · 0.45
InitMethod · 0.45
WriteShortMethod · 0.45
WriteStringMethod · 0.45
WriteIntMethod · 0.45
SendPacketMethod · 0.45
GetDataMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected