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