u32 CGameObject::ef_weapon_type () const { string16 temp; CLSID2TEXT(CLS_ID,temp); R_ASSERT3 (false,"Invalid weapon type request, virtual function is not properly overridden!",temp); return (u32(-1)); // return (u32(0)); }
void xrServer::Process_update(NET_Packet& P, ClientID sender) { xrClientData* CL = ID_to_client(sender); if (!CL) { return; } // if (CL) CL->net_Ready = TRUE; #ifdef DEBUG if (g_Dump_Update_Read) Msg("---- UPDATE_Read --- "); #endif // Entities R_ASSERT(CL->flags.bLocal); // while has information while (!P.r_eof()) { // find entity u16 ID; u8 size; P.r_u16 (ID); P.r_u8 (size); u32 _pos = P.r_tell(); CSE_Abstract *E = ID_to_entity(ID); if (E) { //Msg ("sv_import: %d '%s'",E->ID,E->name_replace()); E->net_Ready = TRUE; E->UPDATE_Read (P); #ifdef DEBUG if (g_Dump_Update_Read) Msg("* %s : %d - %d", E->name(), size, P.r_tell() - _pos); #endif if ((P.r_tell()-_pos) != size) { string16 tmp; CLSID2TEXT (E->m_tClassID,tmp); Debug.fatal (DEBUG_INFO,"Beer from the creator of '%s'",tmp); } } else P.r_advance (size); } #ifdef DEBUG if (g_Dump_Update_Read) Msg("-------------------- "); #endif // Entities }
void xrServer::Process_update(NET_Packet& P, ClientID sender) { xrClientData* CL = ID_to_client(sender); R_ASSERT2 (CL,"Process_update client not found"); if (g_Dump_Update_Read) Msg("---- UPDATE_Read --- "); R_ASSERT(CL->flags.bLocal); // while has information while (!P.r_eof()) { // find entity u16 ID; u8 size; P.r_u16 (ID); P.r_u8 (size); u32 _pos = P.r_tell(); CSE_Abstract *E = ID_to_entity(ID); if (E) { //Msg ("sv_import: %d '%s'",E->ID,E->name_replace()); E->net_Ready = TRUE; E->UPDATE_Read (P); u32 cp = P.r_tell(); if (g_Dump_Update_Read) Msg("* %s : %d - %d", E->name(), size, cp - _pos); if ((cp - _pos) != size) { string16 tmp; CLSID2TEXT (E->m_tClassID,tmp); Msg("* size = %d, start read = %d, end read = %d", size, _pos, cp); Debug.fatal (DEBUG_INFO,"Beer from the creator of '%s', version of object = %d", tmp, E->m_wVersion); } } else P.r_advance (size); } if (g_Dump_Update_Read) Msg("-------------------- "); }