//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void C_WeaponCombat_ChargeablePlasma::OnDataChanged( DataUpdateType_t updateType )
{
	BaseClass::OnDataChanged( updateType );

	switch( updateType )
	{
	case DATA_UPDATE_CREATED:
		// So we can update our lights
		if ( GetTeamNumber() == 1 )
			m_hMaterial.Init( "sprites/chargeball_team1" );
		else 
			m_hMaterial.Init( "sprites/chargeball_team2" );

		break;								

	case DATA_UPDATE_DATATABLE_CHANGED:
		if ( m_bCharging != m_bLastCharging )
		{
			if ( m_bCharging )
			{
				StartCharging();
			}
			else
			{
				StopCharging();
			}
		}
		break;
	};

	if (WeaponState() == WEAPON_IS_ACTIVE)
	{
		// Start thinking so we can manipulate the light
		SetNextClientThink( CLIENT_THINK_ALWAYS );
	}
	else
	{
		SetNextClientThink( CLIENT_THINK_NEVER );
	}
}
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CTFFlameThrower::OnDataChanged(DataUpdateType_t updateType)
{
	BaseClass::OnDataChanged(updateType);

	if ( IsCarrierAlive() && ( WeaponState() == WEAPON_IS_ACTIVE ) && ( GetPlayerOwner()->GetAmmoCount( m_iPrimaryAmmoType ) > 0 ) )
	{
		if ( m_iWeaponState > FT_STATE_IDLE )
		{
			if ( m_iWeaponState != FT_STATE_AIRBLASTING || !GetPlayerOwner()->IsLocalPlayer() )
			{
				StartFlame();
			}
		}
		else
		{
			StartPilotLight();
		}		
	}
	else 
	{
		StopFlame();
		StopPilotLight();
	}
}