本文整理汇总了C++中CBaseCombatWeapon::GetWpnData方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseCombatWeapon::GetWpnData方法的具体用法?C++ CBaseCombatWeapon::GetWpnData怎么用?C++ CBaseCombatWeapon::GetWpnData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseCombatWeapon
的用法示例。
在下文中一共展示了CBaseCombatWeapon::GetWpnData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShouldFlipViewModel
inline bool C_BaseViewModel::ShouldFlipViewModel()
{
// If cl_righthand is set, then we want them all right-handed.
CBaseCombatWeapon *pWeapon = m_hWeapon.Get();
if (pWeapon)
{
const FileWeaponInfo_t *pInfo = &pWeapon->GetWpnData();
return pInfo->m_bAllowFlipping && pInfo->m_bBuiltRightHanded != cl_righthand.GetBool();
}
return false;
}
示例2: ShouldFlipViewModel
inline bool C_BaseViewModel::ShouldFlipViewModel()
{
#if defined ( CSTRIKE_DLL ) || defined ( MYMOD_CLIENT_DLL )
// If cl_righthand is set, then we want them all right-handed.
CBaseCombatWeapon *pWeapon = m_hWeapon.Get();
if ( pWeapon )
{
const FileWeaponInfo_t *pInfo = &pWeapon->GetWpnData();
return pInfo->m_bAllowFlipping && pInfo->m_bBuiltRightHanded != cl_righthand.GetBool();
}
#endif
#ifdef TF_CLIENT_DLL
CBaseCombatWeapon *pWeapon = m_hWeapon.Get();
if ( pWeapon )
{
return pWeapon->m_bFlipViewModel != cl_flipviewmodels.GetBool();
}
#endif
return false;
}
示例3: ShouldFlipViewModel
inline bool C_BaseViewModel::ShouldFlipViewModel()
{
//Tony; changed for SDK so that the CSS models can be flipped out of the box.
#if defined( CSTRIKE_DLL ) || defined ( SDK_DLL )
//Tony; move this up here.
if (!cl_righthand.GetBool())
return false;
// If cl_righthand is set, then we want them all right-handed.
CBaseCombatWeapon *pWeapon = m_hWeapon.Get();
if ( pWeapon )
{
const FileWeaponInfo_t *pInfo = &pWeapon->GetWpnData();
//Tony; if they're already built right handed (default) then we can get out.
if (pInfo->m_bBuiltRightHanded)
return false;
return pInfo->m_bAllowFlipping;
}
#endif
return false;
}