本文整理汇总了C++中CBaseViewModel::DoMuzzleFlash方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseViewModel::DoMuzzleFlash方法的具体用法?C++ CBaseViewModel::DoMuzzleFlash怎么用?C++ CBaseViewModel::DoMuzzleFlash使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseViewModel
的用法示例。
在下文中一共展示了CBaseViewModel::DoMuzzleFlash方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoMuzzleFlash
void CBasePlayer::DoMuzzleFlash()
{
for ( int i = 0; i < MAX_VIEWMODELS; i++ )
{
CBaseViewModel *vm = GetViewModel( i );
if ( !vm )
continue;
vm->DoMuzzleFlash();
}
BaseClass::DoMuzzleFlash();
}
示例2: DoMuzzleFlash
void CSDKPlayer::DoMuzzleFlash()
{
#ifdef CLIENT_DLL
if (prediction->InPrediction() && !prediction->IsFirstTimePredicted())
return;
C_SDKPlayer* pLocalPlayer = C_SDKPlayer::GetLocalSDKPlayer();
C_WeaponSDKBase* pActiveWeapon = GetActiveSDKWeapon();
if (pLocalPlayer)
{
if (pLocalPlayer == this && !::input->CAM_IsThirdPerson() || pLocalPlayer->GetObserverMode() == OBS_MODE_IN_EYE && pLocalPlayer->GetObserverTarget() == this)
{
for ( int i = 0; i < MAX_VIEWMODELS; i++ )
{
CBaseViewModel *vm = GetViewModel( i );
if ( !vm )
continue;
vm->DoMuzzleFlash();
}
}
else if (pActiveWeapon)
{
// Force world model so the attachments work.
pActiveWeapon->SetModelIndex( pActiveWeapon->GetWorldModelIndex() );
switch (pActiveWeapon->GetWeaponType())
{
case WT_PISTOL:
default:
pActiveWeapon->ParticleProp()->Create( "muzzleflash_pistol", PATTACH_POINT_FOLLOW, "muzzle" );
break;
case WT_SMG:
pActiveWeapon->ParticleProp()->Create( "muzzleflash_smg", PATTACH_POINT_FOLLOW, "muzzle" );
break;
case WT_RIFLE:
pActiveWeapon->ParticleProp()->Create( "muzzleflash_rifle", PATTACH_POINT_FOLLOW, "muzzle" );
break;
case WT_SHOTGUN:
pActiveWeapon->ParticleProp()->Create( "muzzleflash_shotgun", PATTACH_POINT_FOLLOW, "muzzle" );
break;
}
}
}
#endif
}