| 17 | #include "UIGameSP.h" |
| 18 | |
| 19 | void CLevel::ClientReceive() |
| 20 | { |
| 21 | |
| 22 | m_dwRPC = 0; |
| 23 | m_dwRPS = 0; |
| 24 | |
| 25 | for (NET_Packet* P = net_msg_Retreive(); P; P = net_msg_Retreive()) |
| 26 | { |
| 27 | //----------------------------------------------------- |
| 28 | m_dwRPC++; |
| 29 | m_dwRPS += P->B.count; |
| 30 | //----------------------------------------------------- |
| 31 | u16 m_type; |
| 32 | P->r_begin(m_type); |
| 33 | switch (m_type) |
| 34 | { |
| 35 | case M_SPAWN: { |
| 36 | if (!m_bGameConfigStarted || !bReady) |
| 37 | { |
| 38 | Msg("Unconventional M_SPAWN received : cgf[%s] | bReady[%s]", (m_bGameConfigStarted) ? "true" : "false", (bReady) ? "true" : "false"); |
| 39 | break; |
| 40 | } |
| 41 | /*/ |
| 42 | cl_Process_Spawn(*P); |
| 43 | /*/ |
| 44 | game_events->insert(*P); |
| 45 | if (g_bDebugEvents) |
| 46 | ProcessGameEvents(); |
| 47 | //*/ |
| 48 | } |
| 49 | break; |
| 50 | case M_EVENT: |
| 51 | game_events->insert(*P); |
| 52 | if (g_bDebugEvents) |
| 53 | ProcessGameEvents(); |
| 54 | break; |
| 55 | case M_EVENT_PACK: { |
| 56 | NET_Packet tmpP; |
| 57 | while (!P->r_eof()) |
| 58 | { |
| 59 | tmpP.B.count = P->r_u8(); |
| 60 | P->r(&tmpP.B.data, tmpP.B.count); |
| 61 | tmpP.timeReceive = P->timeReceive; |
| 62 | |
| 63 | game_events->insert(tmpP); |
| 64 | if (g_bDebugEvents) |
| 65 | ProcessGameEvents(); |
| 66 | } |
| 67 | } |
| 68 | break; |
| 69 | case M_UPDATE: { |
| 70 | game->net_import_update(*P); |
| 71 | } |
| 72 | break; |
| 73 | case M_SV_CONFIG_NEW_CLIENT: InitializeClientGame(*P); break; |
| 74 | case M_SV_CONFIG_GAME: game->net_import_state(*P); break; |
| 75 | case M_SV_CONFIG_FINISHED: |
| 76 | game_configured = TRUE; |
nothing calls this directly
no test coverage detected