本文整理汇总了C++中CASW_Player::GetClientIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ CASW_Player::GetClientIndex方法的具体用法?C++ CASW_Player::GetClientIndex怎么用?C++ CASW_Player::GetClientIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CASW_Player
的用法示例。
在下文中一共展示了CASW_Player::GetClientIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendProxy_SendASWActiveLocalWeaponDataTable
//-----------------------------------------------------------------------------
// Purpose: Only send to local player if this weapon is the active weapon and this marine is the active marine
// Input : *pStruct -
// *pVarData -
// *pRecipients -
// objectID -
// Output : void*
//-----------------------------------------------------------------------------
void* SendProxy_SendASWActiveLocalWeaponDataTable( const SendProp *pProp, const void *pStruct, const void *pVarData, CSendProxyRecipients *pRecipients, int objectID )
{
// Get the weapon entity
CASW_Weapon *pWeapon = (CASW_Weapon*)pVarData;
if ( pWeapon )
{
// Only send this chunk of data to the commander of the marine carrying this weapon
CASW_Player *pPlayer = pWeapon->GetCommander();
if ( pPlayer && pPlayer->GetMarine() == pWeapon->GetOwner() )
{
pRecipients->SetOnly( pPlayer->GetClientIndex() );
}
else
{
pRecipients->ClearAllRecipients();
}
}
return (void*)pVarData;
}