void game_cl_Deathmatch::OnSkinMenu_Ok () { CObject *l_pObj = Level().CurrentEntity(); CGameObject *l_pPlayer = smart_cast<CGameObject*>(l_pObj); if(!l_pPlayer) return; NET_Packet P; l_pPlayer->u_EventGen (P, GE_GAME_EVENT, l_pPlayer->ID() ); P.w_u16(GAME_EVENT_PLAYER_GAME_MENU); P.w_u8(PLAYER_CHANGE_SKIN); P.w_s8 ((u8)pCurSkinMenu->GetActiveIndex()); l_pPlayer->u_EventSend (P); //----------------------------------------------------------------- m_bSkinSelected = TRUE; // second stub here if (pCurBuyMenu) { if (-1 == pCurSkinMenu->GetActiveIndex()) pCurBuyMenu->SetSkin(0); else pCurBuyMenu->SetSkin((u8)pCurSkinMenu->GetActiveIndex()); } };
void game_PlayerState::net_Export(NET_Packet& P, BOOL Full) { P.w_u8 (Full ? 1 : 0); if (Full) P.w_stringZ ( name ); P.w_u8 ( team ); P.w_s16 ( m_iRivalKills ); P.w_s16 ( m_iSelfKills ); P.w_s16 ( m_iTeamKills ); P.w_s16 ( m_iDeaths ); P.w_s32 ( money_for_round ); P.w_float_q8 ( experience_D, -1.0f, 2.0f); P.w_u8 ( rank ); P.w_u8 ( af_count ); P.w_u16 ( flags__ ); P.w_u16 ( ping ); P.w_u16 ( GameID ); P.w_s8 ( skin ); P.w_u8 ( m_bCurrentVoteAgreed ); P.w_u32 (Device.dwTimeGlobal - DeathTime); };