Esempio n. 1
0
void CASW_Zombie::ASW_Ignite( float flFlameLifetime, float flSize, CBaseEntity *pAttacker, CBaseEntity *pDamagingWeapon /*= NULL */ )
{
	if (AllowedToIgnite())
	{
		if( IsOnFire() )
			return;

		m_bOnFire = true;
		if (ASWBurning())
			ASWBurning()->BurnEntity(this, pAttacker, flFlameLifetime, 0.4f, 5.0f * 0.4f);	// 5 dps, applied every 0.4 seconds

		/*
		CEntityFlame *pFlame = CEntityFlame::Create( this );
		if (pFlame)
		{
			if (pAttacker)
				pFlame->SetOwnerEntity(pAttacker);
			pFlame->SetLifetime( flFlameLifetime );
			AddFlag( FL_ONFIRE );

			SetEffectEntity( pFlame );

			if ( flSize > 0.0f )
			{
				pFlame->SetSize( flSize );
			}
		}
		*/

		m_OnIgnite.FireOutput( this, this );

		RemoveSpawnFlags( SF_NPC_GAG );
		
		MoanSound( envASWZombieMoanIgnited, ARRAYSIZE( envASWZombieMoanIgnited ) );

		if( m_pMoanSound )
		{
			ENVELOPE_CONTROLLER.SoundChangePitch( m_pMoanSound, 120, 1.0 );
			ENVELOPE_CONTROLLER.SoundChangeVolume( m_pMoanSound, 1, 1.0 );
		}
	}
}
Esempio n. 2
0
void CASW_Simple_Alien::ASW_Ignite( float flFlameLifetime, float flSize, CBaseEntity *pAttacker, CBaseEntity *pDamagingWeapon )
{
	if (AllowedToIgnite())
	{
		if( IsOnFire() )
		return;

		CEntityFlame *pFlame = CEntityFlame::Create( this, flFlameLifetime, flSize );
		if (pFlame)
		{
			if (pAttacker)
				pFlame->SetOwnerEntity(pAttacker);
			pFlame->SetLifetime( flFlameLifetime );
			AddFlag( FL_ONFIRE );

			SetEffectEntity( pFlame );
		}

		m_OnIgnite.FireOutput( this, this );
	}
}