void game_PlayerState::net_Import(NET_Packet& P) { BOOL bFullUpdate = !!P.r_u8(); if (bFullUpdate) P.r_stringZ (name); P.r_u8 ( team ); P.r_s16 ( m_iRivalKills ); P.r_s16 ( m_iSelfKills ); P.r_s16 ( m_iTeamKills ); P.r_s16 ( m_iDeaths ); P.r_s32 ( money_for_round ); P.r_float_q8 ( experience_D, -1.0f, 2.0f); P.r_u8 ( rank ); P.r_u8 ( af_count ); P.r_u16 ( flags__ ); P.r_u16 ( ping ); P.r_u16 ( GameID ); P.r_s8 ( skin ); P.r_u8 ( m_bCurrentVoteAgreed ); DeathTime = P.r_u32(); };
void game_sv_TeamDeathmatch::OnPlayerSelectTeam (NET_Packet& P, ClientID sender) { xrClientData *l_pC = m_server->ID_to_client(sender); s16 l_team; P.r_s16(l_team); OnPlayerChangeTeam(l_pC->ID, l_team); //------------------------------------------------- };
void game_cl_TeamDeathmatch::OnGameMenuRespond_ChangeTeam (NET_Packet& P) { s16 OldTeam = local_player->team; local_player->team = u8(P.r_s16() & 0x00ff); if (OldTeam != local_player->team) OnTeamChanged(); SetCurrentSkinMenu(); if (pCurSkinMenu) { pCurSkinMenu->SetCurSkin(local_player->skin); if (CanCallSkinMenu()) StartStopMenu(pCurSkinMenu, true); } };