================== idAsyncServer::ProcessReliableClientMessages ================== */
| 1339 | ================== |
| 1340 | */ |
| 1341 | void idAsyncServer::ProcessReliableClientMessages( int clientNum ) { |
| 1342 | idBitMsg msg; |
| 1343 | byte msgBuf[MAX_MESSAGE_SIZE]; |
| 1344 | byte id; |
| 1345 | |
| 1346 | serverClient_t &client = clients[clientNum]; |
| 1347 | |
| 1348 | msg.Init( msgBuf, sizeof( msgBuf ) ); |
| 1349 | |
| 1350 | while ( client.channel.GetReliableMessage( msg ) ) { |
| 1351 | id = msg.ReadByte(); |
| 1352 | switch( id ) { |
| 1353 | case CLIENT_RELIABLE_MESSAGE_CLIENTINFO: { |
| 1354 | idDict info; |
| 1355 | msg.ReadDeltaDict( info, &sessLocal.mapSpawnData.userInfo[clientNum] ); |
| 1356 | SendUserInfoBroadcast( clientNum, info ); |
| 1357 | break; |
| 1358 | } |
| 1359 | case CLIENT_RELIABLE_MESSAGE_PRINT: { |
| 1360 | char string[MAX_STRING_CHARS]; |
| 1361 | msg.ReadString( string, sizeof( string ) ); |
| 1362 | common->Printf( "%s\n", string ); |
| 1363 | break; |
| 1364 | } |
| 1365 | case CLIENT_RELIABLE_MESSAGE_DISCONNECT: { |
| 1366 | DropClient( clientNum, "#str_07138" ); |
| 1367 | break; |
| 1368 | } |
| 1369 | case CLIENT_RELIABLE_MESSAGE_PURE: { |
| 1370 | // we get this message once the client has successfully updated it's pure list |
| 1371 | ProcessReliablePure( clientNum, msg ); |
| 1372 | break; |
| 1373 | } |
| 1374 | default: { |
| 1375 | // pass reliable message on to game code |
| 1376 | game->ServerProcessReliableMessage( clientNum, msg ); |
| 1377 | break; |
| 1378 | } |
| 1379 | } |
| 1380 | } |
| 1381 | } |
| 1382 | |
| 1383 | /* |
| 1384 | ================== |
nothing calls this directly
no test coverage detected