本文整理汇总了C++中ResetEmptySound函数的典型用法代码示例。如果您正苦于以下问题:C++ ResetEmptySound函数的具体用法?C++ ResetEmptySound怎么用?C++ ResetEmptySound使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ResetEmptySound函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateSpot
void CTEST::WeaponIdle( void )
{
UpdateSpot( );
ResetEmptySound( );
m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
if (m_flTimeWeaponIdle > gpGlobals->time)
return;
int iAnim;
switch ( RANDOM_LONG( 0, 1 ) )
{
case 0:
iAnim = TEST_LONGIDLE;
break;
default:
case 1:
iAnim = TEST_IDLE1;
break;
}
SendWeaponAnim( iAnim );
m_flTimeWeaponIdle = gpGlobals->time + RANDOM_FLOAT ( 10, 15 );// how long till we do this again.
}
示例2: ResetEmptySound
void CUSP::WeaponIdle()
{
ResetEmptySound();
m_pPlayer->GetAutoaimVector( AUTOAIM_10DEGREES );
if( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() )
{
return;
}
if( m_pPlayer->HasShield() )
{
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + USP_IDLE_INTERVAL;
if( FBitSet( m_fWeaponState, WEAPONSTATE_SHIELD_DRAWN ) )
{
SendWeaponAnim( GUN_IDLE1, UseDecrement() );
}
}
else if( m_iClip )
{
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + USP_IDLE_INTERVAL_NOSHIELD;
SendWeaponAnim( USP_IDLE_UNSIL * !FBitSet( m_fWeaponState, WEAPONSTATE_USP_SILENCED ), UseDecrement() );
}
}
示例3: ResetEmptySound
void CGlock::WeaponIdle( void )
{
ResetEmptySound( );
m_pPlayer->GetAutoaimVector( AUTOAIM_10DEGREES );
if ( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() )
return;
// only idle if the slid isn't back
if (m_iClip != 0)
{
int iAnim;
float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0.0, 1.0 );
if (flRand <= 0.3 + 0 * 0.75)
{
iAnim = GLOCK_IDLE3;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 49.0 / 16;
}
else if (flRand <= 0.6 + 0 * 0.875)
{
iAnim = GLOCK_IDLE1;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60.0 / 16.0;
}
else
{
iAnim = GLOCK_IDLE2;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 40.0 / 16.0;
}
SendWeaponAnim( iAnim, 1 );
}
}
示例4: ResetEmptySound
void CEgon::WeaponIdle( void )
{
ResetEmptySound( );
if ( m_flTimeWeaponIdle > gpGlobals->time )
return;
if ( m_fireState != FIRE_OFF )
EndAttack();
int iAnim;
float flRand = RANDOM_FLOAT(0,1);
if ( flRand <= 0.5 )
{
iAnim = EGON_IDLE1;
m_flTimeWeaponIdle = gpGlobals->time + RANDOM_FLOAT(10,15);
}
else
{
iAnim = EGON_FIDGET1;
m_flTimeWeaponIdle = gpGlobals->time + 3;
}
SendWeaponAnim( iAnim );
m_deployed = TRUE;
}
示例5: ResetEmptySound
void CFiveSeven::WeaponIdle( void )
{
ResetEmptySound();
m_pPlayer->GetAutoaimVector( AUTOAIM_10DEGREES );
if( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() )
{
return;
}
if( m_pPlayer->HasShield() )
{
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0;
if( FBitSet( m_iWeaponState, WPNSTATE_SHIELD_DRAWN ) )
{
SendWeaponAnim( SHIELDGUN_DRAWN_IDLE, UseDecrement() != FALSE );
}
}
else if( m_iClip )
{
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0625;
SendWeaponAnim( FIVESEVEN_IDLE, UseDecrement() != FALSE );
}
}
示例6: ResetEmptySound
/* <2b9c2a> ../cstrike/dlls/wpn_shared/wpn_usp.cpp:318 */
void CUSP::__MAKE_VHOOK(WeaponIdle)(void)
{
ResetEmptySound();
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
if (m_flTimeWeaponIdle > 0)
{
return;
}
if (m_pPlayer->HasShield())
{
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0;
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
{
SendWeaponAnim(USP_DRAW, UseDecrement());
}
}
else if (m_iClip)
{
int iAnim = (~m_iWeaponState & WPNSTATE_USP_SILENCED) ? USP_UNSIL_IDLE: USP_IDLE;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60.0;
SendWeaponAnim(iAnim, UseDecrement());
}
}
示例7: ResetEmptySound
void CM3::WeaponIdle(void)
{
ResetEmptySound();
m_pPlayer->GetAutoaimVector(AUTOAIM_5DEGREES);
if (m_flPumpTime && m_flPumpTime < UTIL_WeaponTimeBase())
m_flPumpTime = 0;
if (m_flTimeWeaponIdle < UTIL_WeaponTimeBase())
{
if (m_iClip == 0 && m_fInSpecialReload == 0 && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
{
Reload();
}
else if (m_fInSpecialReload != 0)
{
if (m_iClip != M3_MAX_CLIP && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
{
Reload();
}
else
{
SendWeaponAnim(M3_PUMP, UseDecrement() != FALSE);
m_fInSpecialReload = 0;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5;
}
}
else
SendWeaponAnim(M3_IDLE, UseDecrement() != FALSE);
}
}
示例8: ResetEmptySound
void CMP5::WeaponIdle( void )
{
ResetEmptySound( );
m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
return;
if (m_iClip != 0)
{
if ( m_fDefaultAnim == SILENCER_OFF_FULLAUTO || m_fDefaultAnim == SILENCER_OFF_SEMI )
{
if (RANDOM_LONG(0,1))
SendWeaponAnim( A2_IDLE1 );
else
SendWeaponAnim( A2_IDLE2 );
}
else
{
if (RANDOM_LONG(0,1))
SendWeaponAnim( SD2_IDLE1 );
else
SendWeaponAnim( SD2_IDLE2 );
}
m_flTimeWeaponIdle = UTIL_SharedRandomFloat(m_pPlayer->random_seed, 10, 15);
}
}
示例9: ResetEmptySound
void AvHBasePlayerWeapon::WeaponIdle(void)
{
//#ifdef AVH_CLIENT
// char sz[ 128 ];
// sprintf(sz, "during idle, clip is %d\n", this->m_iClip);
// gEngfuncs.pfnCenterPrint( sz );
//
// //gEngfuncs.Con_Printf("during idle, clip is %d\n", sz);
//#endif
if(this->mAttackButtonDownLastFrame)
{
this->PlaybackEvent(this->mEndEvent);
this->mAttackButtonDownLastFrame = false;
}
ResetEmptySound();
this->m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
if(this->m_flTimeWeaponIdle <= UTIL_WeaponTimeBase())
{
this->SendWeaponAnim(this->GetIdleAnimation());
this->m_pPlayer->SetAnimation(PLAYER_IDLE);
this->SetNextIdle();
}
}
示例10: ALERT
void CAK74::WeaponIdle( void )
{
/*
if (!FStringNull (v_model) )
{
ALERT (at_console, "v_model is %s \n",STRING( v_model));
ALERT (at_console, "p_model is %s \n",STRING( p_model));
ALERT (at_console, "w_model is %s \n",STRING( w_model));
}
*/
ResetEmptySound( );
m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
if ( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() )
return;
int iAnim;
switch ( RANDOM_LONG( 0, 1 ) )
{
case 0:
iAnim = AK_NMC_IDLE1;
break;
default:
case 1:
iAnim = AK_NMC_IDLE2;
break;
}
SendWeaponAnim( iAnim );
m_flTimeWeaponIdle = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); // how long till we do this again.
}
示例11: ResetEmptySound
void CGlock::WeaponIdle( void )
{
ResetEmptySound( );
m_pPlayer->GetAutoaimVector( AUTOAIM_10DEGREES );
if (m_flTimeWeaponIdle > gpGlobals->time)
return;
// only idle if the slid isn't back
if (m_iClip != 0)
{
int iAnim;
float flRand = RANDOM_FLOAT(0, 1);
if (flRand <= 0.3 + 0 * 0.75)
{
iAnim = GLOCK_IDLE3;
m_flTimeWeaponIdle = gpGlobals->time + 49.0 / 16;
}
else if (flRand <= 0.6 + 0 * 0.875)
{
iAnim = GLOCK_IDLE1;
m_flTimeWeaponIdle = gpGlobals->time + 60.0 / 16.0;
}
else
{
iAnim = GLOCK_IDLE2;
m_flTimeWeaponIdle = gpGlobals->time + 40.0 / 16.0;
}
SendWeaponAnim( iAnim );
}
}
示例12: ResetEmptySound
void CEgon::WeaponIdle( void )
{
ResetEmptySound( );
if ( m_flTimeWeaponIdle > gpGlobals->time )
return;
if ( m_fireState != FIRE_OFF )
EndAttack();
int iAnim;
float flRand = RANDOM_FLOAT(0,1);
if ( flRand <= 0.5 )
{
iAnim = EGON_IDLE1;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
}
else
{
iAnim = EGON_FIDGET1;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3;
}
SendWeaponAnim( iAnim );
m_deployed = TRUE;
}
示例13: ResetEmptySound
void CUSP::WeaponIdle(void)
{
ResetEmptySound();
m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);
if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
return;
if (m_pPlayer->HasShield())
{
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
SendWeaponAnim(USP_DRAW, UseDecrement() != FALSE);
return;
}
if (m_iClip)
{
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60;
if (m_iWeaponState & WPNSTATE_USP_SILENCED)
SendWeaponAnim(USP_IDLE, UseDecrement() != FALSE);
else
SendWeaponAnim(USP_UNSIL_IDLE, UseDecrement() != FALSE);
}
}
示例14: ResetEmptySound
void CMP5::WeaponIdle( void )
{
ResetEmptySound( );
m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
if ( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() )
return;
int iAnim;
switch ( RANDOM_LONG( 0, 1 ) )
{
case 0:
iAnim = MP5_LONGIDLE;
break;
default:
case 1:
iAnim = MP5_IDLE1;
break;
}
SendWeaponAnim( iAnim );
m_flTimeWeaponIdle = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); // how long till we do this again.
}
示例15: UpdateClip
void CM249::WeaponIdle( void )
{
if (m_flTimeWeaponIdle < UTIL_WeaponTimeBase() )
{
if ( m_fInSpecialReload )
{
UpdateClip();
m_fInSpecialReload = 0;
SendWeaponAnim( M249_RELOAD2 , UseDecrement() ? 1 : 0, pev->body );
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 111.0 / 45.0;
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 111.0 / 45.0;
}
else
{
ResetEmptySound( );
UpdateClip();
int iAnim;
float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 );
if (flRand <= 0.8)
{
iAnim = M249_SLOWIDLE;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + (45.0/9.0);
}
else
{
iAnim = M249_IDLE1;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + (74.0/12.0);// * RANDOM_LONG(2, 5);
}
SendWeaponAnim( iAnim , UseDecrement() ? 1 : 0, pev->body );
}
}
}