| 5 | int g_Dump_Update_Read = 0; |
| 6 | |
| 7 | void xrServer::Process_update(NET_Packet& P, ClientID sender) |
| 8 | { |
| 9 | xrClientData* CL = ID_to_client(sender); |
| 10 | R_ASSERT2(CL, "Process_update client not found"); |
| 11 | |
| 12 | if (g_Dump_Update_Read) |
| 13 | Msg("---- UPDATE_Read --- "); |
| 14 | |
| 15 | R_ASSERT(CL->flags.bLocal); |
| 16 | // while has information |
| 17 | while (!P.r_eof()) |
| 18 | { |
| 19 | // find entity |
| 20 | u16 ID; |
| 21 | u8 size; |
| 22 | |
| 23 | P.r_u16(ID); |
| 24 | P.r_u8(size); |
| 25 | u32 _pos = P.r_tell(); |
| 26 | CSE_Abstract* E = ID_to_entity(ID); |
| 27 | |
| 28 | if (E) |
| 29 | { |
| 30 | // Msg ("sv_import: %d '%s'",E->ID,E->name_replace()); |
| 31 | E->net_Ready = TRUE; |
| 32 | E->UPDATE_Read(P); |
| 33 | |
| 34 | if (g_Dump_Update_Read) |
| 35 | Msg("* %s : %d - %d", E->name(), size, P.r_tell() - _pos); |
| 36 | |
| 37 | if ((P.r_tell() - _pos) != size) |
| 38 | { |
| 39 | string16 tmp; |
| 40 | CLSID2TEXT(E->m_tClassID, tmp); |
| 41 | Debug.fatal(DEBUG_INFO, "Beer from the creator of '%s'", tmp); |
| 42 | } |
| 43 | } |
| 44 | else |
| 45 | P.r_advance(size); |
| 46 | } |
| 47 | if (g_Dump_Update_Read) |
| 48 | Msg("-------------------- "); |
| 49 | } |
| 50 | |
| 51 | void xrServer::Process_save(NET_Packet& P, ClientID sender) |
| 52 | { |
nothing calls this directly
no test coverage detected