本文整理汇总了C++中NET_Packet::w_s8方法的典型用法代码示例。如果您正苦于以下问题:C++ NET_Packet::w_s8方法的具体用法?C++ NET_Packet::w_s8怎么用?C++ NET_Packet::w_s8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NET_Packet
的用法示例。
在下文中一共展示了NET_Packet::w_s8方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Level
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());
}
};
示例2:
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);
};