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

Method SendReliablePureToClient

neo/framework/async/AsyncServer.cpp:1591–1620  ·  view source on GitHub ↗

================== idAsyncServer::SendReliablePureToClient ================== */

Source from the content-addressed store, hash-verified

1589==================
1590*/
1591bool idAsyncServer::SendReliablePureToClient( int clientNum ) {
1592 idBitMsg msg;
1593 byte msgBuf[ MAX_MESSAGE_SIZE ];
1594 int serverChecksums[ MAX_PURE_PAKS ];
1595 int i;
1596
1597 fileSystem->GetPureServerChecksums( serverChecksums );
1598 if ( !serverChecksums[ 0 ] ) {
1599 // happens if you run fully expanded assets with si_pure 1
1600 common->Warning( "pure server has no pak files referenced" );
1601 return false;
1602 }
1603
1604 common->DPrintf( "client %d: sending pure pak list (reliable channel) @ gameInitId %d\n", clientNum, gameInitId );
1605
1606 msg.Init( msgBuf, sizeof( msgBuf ) );
1607 msg.WriteByte( SERVER_RELIABLE_MESSAGE_PURE );
1608
1609 msg.WriteInt( gameInitId );
1610
1611 i = 0;
1612 while ( serverChecksums[ i ] ) {
1613 msg.WriteInt( serverChecksums[ i++ ] );
1614 }
1615 msg.WriteInt( 0 );
1616
1617 SendReliableMessage( clientNum, msg );
1618
1619 return true;
1620}
1621
1622/*
1623==================

Callers

nothing calls this directly

Calls 6

WarningMethod · 0.45
DPrintfMethod · 0.45
InitMethod · 0.45
WriteByteMethod · 0.45
WriteIntMethod · 0.45

Tested by

no test coverage detected