本文整理汇总了C++中NET_Packet::r_s8方法的典型用法代码示例。如果您正苦于以下问题:C++ NET_Packet::r_s8方法的具体用法?C++ NET_Packet::r_s8怎么用?C++ NET_Packet::r_s8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NET_Packet
的用法示例。
在下文中一共展示了NET_Packet::r_s8方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: OnGameMenuRespond_ChangeSkin
void game_cl_Deathmatch::OnGameMenuRespond_ChangeSkin(NET_Packet& P)
{
s8 NewSkin = P.r_s8();
local_player->skin = NewSkin;
if (pCurSkinMenu && pCurSkinMenu->IsShown())
pCurSkinMenu->HideDialog();
//if (m_game_ui->m_pMapDesc && m_game_ui->m_pMapDesc->IsShown())
// m_game_ui->m_pMapDesc->HideDialog();
SetCurrentSkinMenu ();
if (pCurSkinMenu) pCurSkinMenu->SetCurSkin(local_player->skin);
SetCurrentBuyMenu ();
ReInitRewardGenerator (local_player);
m_bSpectatorSelected = FALSE;
if (m_bMenuCalledFromReady)
{
OnKeyboardPress (kJUMP);
}
};
示例3: OnGameMenuRespond_ChangeSkin
void game_cl_Deathmatch::OnGameMenuRespond_ChangeSkin(NET_Packet& P)
{
s8 NewSkin = P.r_s8();
local_player->skin = NewSkin;
if (pCurSkinMenu && pCurSkinMenu->IsShown())
StartStopMenu (pCurSkinMenu, true);
if (m_game_ui->m_pMapDesc && m_game_ui->m_pMapDesc->IsShown())
StartStopMenu (m_game_ui->m_pMapDesc, TRUE);
SetCurrentSkinMenu ();
if (pCurSkinMenu) pCurSkinMenu->SetCurSkin(local_player->skin);
SetCurrentBuyMenu ();
if (pCurBuyMenu) pCurBuyMenu->SetSkin(local_player->skin);
m_bSpectatorSelected = FALSE;
if (m_bMenuCalledFromReady)
{
OnKeyboardPress (kJUMP);
}
};
示例4: OnEvent
//.........这里部分代码省略.........
PIItem iitem = smart_cast<CInventoryItem*>(Obj);
R_ASSERT( iitem );
switch (type)
{
case GEG_PLAYER_ITEM2SLOT:
{
u16 slot_id = P.r_u16();
inventory().Slot(slot_id, iitem );
}break;//2
case GEG_PLAYER_ITEM2BELT:
inventory().Belt( iitem );
break;//2
case GEG_PLAYER_ITEM2RUCK:
inventory().Ruck( iitem );
break;//2
case GEG_PLAYER_ITEM_EAT:
inventory().Eat( iitem );
break;//2
}//switch
}break;//1
case GEG_PLAYER_ACTIVATE_SLOT:
{
u16 slot_id;
P.r_u16 (slot_id);
inventory().Activate (slot_id);
}break;
case GEG_PLAYER_DISABLE_SPRINT:
{
s8 cmd = P.r_s8();
m_block_sprint_counter = m_block_sprint_counter+cmd;
Msg("m_block_sprint_counter=%d",m_block_sprint_counter);
if(m_block_sprint_counter>0)
{
mstate_wishful &=~mcSprint;
}
}break;
case GEG_PLAYER_WEAPON_HIDE_STATE:
{
u16 State = P.r_u16();
BOOL Set = !!P.r_u8();
inventory().SetSlotsBlocked (State, !!Set);
}break;
case GE_MOVE_ACTOR:
{
Fvector NewPos, NewRot;
P.r_vec3(NewPos);
P.r_vec3(NewRot);
MoveActor(NewPos, NewRot);
}break;
case GE_ACTOR_MAX_POWER:
{
conditions().MaxPower();
conditions().ClearWounds();
ClearBloodWounds();
}break;
case GE_ACTOR_MAX_HEALTH:
{
SetfHealth(GetMaxHealth());
}break;