================== idAsyncServer::SendGameInitToClient ================== */
| 1109 | ================== |
| 1110 | */ |
| 1111 | void idAsyncServer::SendGameInitToClient( int clientNum ) { |
| 1112 | idBitMsg msg; |
| 1113 | byte msgBuf[MAX_MESSAGE_SIZE]; |
| 1114 | |
| 1115 | if ( idAsyncNetwork::verbose.GetInteger() ) { |
| 1116 | common->Printf( "sending gameinit to client %d: gameInitId = %d, gameFrame = %d, gameTime = %d\n", clientNum, gameInitId, gameFrame, gameTime ); |
| 1117 | } |
| 1118 | |
| 1119 | serverClient_t &client = clients[clientNum]; |
| 1120 | |
| 1121 | // clear the unsent fragments. might flood winsock but that's ok |
| 1122 | while( client.channel.UnsentFragmentsLeft() ) { |
| 1123 | client.channel.SendNextFragment( serverPort, serverTime ); |
| 1124 | } |
| 1125 | |
| 1126 | msg.Init( msgBuf, sizeof( msgBuf ) ); |
| 1127 | msg.WriteInt( gameInitId ); |
| 1128 | msg.WriteByte( SERVER_UNRELIABLE_MESSAGE_GAMEINIT ); |
| 1129 | msg.WriteInt( gameFrame ); |
| 1130 | msg.WriteInt( gameTime ); |
| 1131 | msg.WriteDeltaDict( sessLocal.mapSpawnData.serverInfo, NULL ); |
| 1132 | client.gameInitSequence = client.channel.SendMessage( serverPort, serverTime, msg ); |
| 1133 | } |
| 1134 | |
| 1135 | /* |
| 1136 | ================== |
nothing calls this directly
no test coverage detected