================== idAsyncClient::ProcessReliableMessagePure ================== */
| 877 | ================== |
| 878 | */ |
| 879 | void idAsyncClient::ProcessReliableMessagePure( const idBitMsg &msg ) { |
| 880 | idBitMsg outMsg; |
| 881 | byte msgBuf[ MAX_MESSAGE_SIZE ]; |
| 882 | int inChecksums[ MAX_PURE_PAKS ]; |
| 883 | int i; |
| 884 | int serverGameInitId; |
| 885 | |
| 886 | session->SetGUI( NULL, NULL ); |
| 887 | |
| 888 | serverGameInitId = msg.ReadInt(); |
| 889 | |
| 890 | if ( serverGameInitId != gameInitId ) { |
| 891 | common->DPrintf( "ignoring pure server checksum from an outdated gameInitId (%d)\n", serverGameInitId ); |
| 892 | return; |
| 893 | } |
| 894 | |
| 895 | if ( !ValidatePureServerChecksums( serverAddress, msg ) ) { |
| 896 | |
| 897 | return; |
| 898 | } |
| 899 | |
| 900 | if ( idAsyncNetwork::verbose.GetInteger() ) { |
| 901 | common->Printf( "received new pure server info. ExecuteMapChange and report back\n" ); |
| 902 | } |
| 903 | |
| 904 | // it is now ok to load the next map with updated pure checksums |
| 905 | sessLocal.ExecuteMapChange( true ); |
| 906 | |
| 907 | // upon receiving our pure list, the server will send us SCS_INGAME and we'll start getting snapshots |
| 908 | fileSystem->GetPureServerChecksums( inChecksums ); |
| 909 | outMsg.Init( msgBuf, sizeof( msgBuf ) ); |
| 910 | outMsg.WriteByte( CLIENT_RELIABLE_MESSAGE_PURE ); |
| 911 | |
| 912 | outMsg.WriteInt( gameInitId ); |
| 913 | |
| 914 | i = 0; |
| 915 | while ( inChecksums[ i ] ) { |
| 916 | outMsg.WriteInt( inChecksums[ i++ ] ); |
| 917 | } |
| 918 | outMsg.WriteInt( 0 ); |
| 919 | |
| 920 | if ( !channel.SendReliableMessage( outMsg ) ) { |
| 921 | common->Error( "client->server reliable messages overflow\n" ); |
| 922 | } |
| 923 | } |
| 924 | |
| 925 | /* |
| 926 | =============== |
nothing calls this directly
no test coverage detected