本文整理汇总了C++中CBaseCombatWeapon::ShouldShowControlPanels方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseCombatWeapon::ShouldShowControlPanels方法的具体用法?C++ CBaseCombatWeapon::ShouldShowControlPanels怎么用?C++ CBaseCombatWeapon::ShouldShowControlPanels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseCombatWeapon
的用法示例。
在下文中一共展示了CBaseCombatWeapon::ShouldShowControlPanels方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendViewModelMatchingSequence
//-----------------------------------------------------------------------------
// Purpose:
// Input : sequence -
//-----------------------------------------------------------------------------
void CBaseViewModel::SendViewModelMatchingSequence( int sequence )
{
// since all we do is send a sequence number down to the client,
// set this here so other weapons code knows which sequence is playing.
SetSequence( sequence );
m_nAnimationParity = ( m_nAnimationParity + 1 ) & ( (1<<VIEWMODEL_ANIMATION_PARITY_BITS) - 1 );
#if defined( CLIENT_DLL )
m_nOldAnimationParity = m_nAnimationParity;
// Force frame interpolation to start at exactly frame zero
m_flAnimTime = gpGlobals->curtime;
#else
CBaseCombatWeapon *weapon = m_hWeapon.Get();
bool showControlPanels = weapon && weapon->ShouldShowControlPanels();
SetControlPanelsActive( showControlPanels );
#endif
// Restart animation at frame 0
SetCycle( 0 );
ResetSequenceInfo();
}