当前位置: 首页>>代码示例>>C++>>正文


C++ ResetEmptySound函数代码示例

本文整理汇总了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.
}
开发者ID:JoelTroch,项目名称:am_src_30jan2011,代码行数:28,代码来源:wep_test.cpp

示例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() );
    }
}
开发者ID:johndrinkwater,项目名称:CSSDK,代码行数:26,代码来源:wpn_usp.cpp

示例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 );
	}
}
开发者ID:Hammermaps-DEV,项目名称:Spirit-of-Half-Life-1.8--VC2010,代码行数:33,代码来源:weapon_glock.cpp

示例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;
}
开发者ID:a1batross,项目名称:Xash3D_ancient,代码行数:29,代码来源:egon.cpp

示例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 );
    }
}
开发者ID:Chuvi-w,项目名称:CSSDK,代码行数:25,代码来源:wpn_fiveseven.cpp

示例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());
	}
}
开发者ID:Adidasman1,项目名称:ReGameDLL_CS,代码行数:28,代码来源:wpn_usp.cpp

示例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);
	}
}
开发者ID:jeefo,项目名称:cs16-client,代码行数:32,代码来源:wpn_m3.cpp

示例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);
    }
}
开发者ID:JoelTroch,项目名称:am_src_30jan2011,代码行数:30,代码来源:wep_mp5.cpp

示例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();
	}
}
开发者ID:Arkshine,项目名称:NS,代码行数:29,代码来源:AvHBasePlayerWeapon.cpp

示例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.
}
开发者ID:JoelTroch,项目名称:am_src_30jan2011,代码行数:34,代码来源:wep_ak47.cpp

示例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 );
	}
}
开发者ID:HoLyCoWzOrZ,项目名称:sing-engine,代码行数:32,代码来源:glock.cpp

示例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;
}
开发者ID:Hammermaps-DEV,项目名称:Spirit-of-Half-Life-1.8--VC2010,代码行数:28,代码来源:weapon_egon.cpp

示例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);
	}
}
开发者ID:DeadlyGamer,项目名称:cs16nd,代码行数:28,代码来源:wpn_usp.cpp

示例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.
}
开发者ID:HoLyCoWzOrZ,项目名称:sing-engine,代码行数:26,代码来源:mp5.cpp

示例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 );
		}
	}
}
开发者ID:Fograin,项目名称:hl-subsmod-ex,代码行数:33,代码来源:weapon_m249.cpp


注:本文中的ResetEmptySound函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。