class FlameTracker expands NaliWeapons;

//1st person
#exec MESH IMPORT MESH=FlameTracker ANIVFILE=MODELS\FlameT_a.3d DATAFILE=MODELS\FlameT_d.3d X=0 Y=0 Z=0
#exec MESH LODPARAMS MESH=FlameTracker STRENGTH=0
#exec MESH ORIGIN MESH=FlameTracker X=0 Y=0 Z=10

//1st person special overlayer
#exec MESH IMPORT MESH=FlameTrackerOV ANIVFILE=MODELS\FlameTov_a.3d DATAFILE=MODELS\FlameTov_d.3d X=0 Y=0 Z=0
#exec MESH LODPARAMS MESH=FlameTrackerOV STRENGTH=0
#exec MESH ORIGIN MESH=FlameTrackerOV X=0 Y=0 Z=10

//1st person right handed
#exec MESH IMPORT MESH=FlameTrackerR ANIVFILE=MODELS\FlameT_a.3d DATAFILE=MODELS\FlameT_d.3d X=0 Y=0 Z=0 UNMIRROR=1
#exec MESH LODPARAMS MESH=FlameTrackerR STRENGTH=0
#exec MESH ORIGIN MESH=FlameTrackerR X=0 Y=0 Z=10 YAW=128

//1st person right handed Special Overlayer
#exec MESH IMPORT MESH=FlameTrackerROV ANIVFILE=MODELS\FlameTov_a.3d DATAFILE=MODELS\FlameTov_d.3d X=0 Y=0 Z=0 UNMIRROR=1
#exec MESH LODPARAMS MESH=FlameTrackerROV STRENGTH=0
#exec MESH ORIGIN MESH=FlameTrackerROV X=0 Y=0 Z=10 YAW=128

//Pickup
#exec MESH IMPORT MESH=FlameTrackerPick ANIVFILE=MODELS\FlameTov_a.3d DATAFILE=MODELS\FlameTov_d.3d X=0 Y=0 Z=0
//#exec MESH LODPARAMS MESH=FlameTrackerPick STRENGTH=0
#exec MESH ORIGIN MESH=FlameTrackerPick X=0 Y=0 Z=10

//3rd person
#exec MESH IMPORT MESH=FlameTrackerM ANIVFILE=MODELS\FlameT_a.3d DATAFILE=MODELS\FlameT_d.3d X=0 Y=0 Z=0
#exec MESH LODPARAMS MESH=FlameTrackerM STRENGTH=0
#exec MESH ORIGIN MESH=FlameTrackerM X=-270 Y=0 Z=0

//Pick FX / Mod FX 3rd person
#exec MESH IMPORT MESH=FlameTrackerFXThird ANIVFILE=MODELS\FlameTov_a.3d DATAFILE=MODELS\FlameTov_d.3d X=0 Y=0 Z=0
//#exec MESH LODPARAMS MESH=FlameTrackerFXThird STRENGTH=0
#exec MESH ORIGIN MESH=FlameTrackerFXThird X=-270 Y=0 Z=0

//Pick FX / Mod FX pickup
#exec MESH IMPORT MESH=FlameTrackerFXPick ANIVFILE=MODELS\FlameTov_a.3d DATAFILE=MODELS\FlameTov_d.3d X=0 Y=0 Z=0
//#exec MESH LODPARAMS MESH=FlameTrackerFXPick STRENGTH=0
#exec MESH ORIGIN MESH=FlameTrackerFXPick X=0 Y=0 Z=10



//-----------------------------------------------------------------------------------

//Animations
#exec MESH SEQUENCE MESH=FlameTracker SEQ=All STARTFRAME=0 NUMFRAMES=41
#exec MESH SEQUENCE MESH=FlameTracker SEQ=Still STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=FlameTracker SEQ=Fire STARTFRAME=0 NUMFRAMES=2 RATE=6.0
#exec MESH SEQUENCE MESH=FlameTracker SEQ=AltFire STARTFRAME=20 NUMFRAMES=10 RATE=5.0
#exec MESH SEQUENCE MESH=FlameTracker SEQ=Select STARTFRAME=30 NUMFRAMES=6 RATE=9.0 GROUP=Select
#exec MESH SEQUENCE MESH=FlameTracker SEQ=Down STARTFRAME=35 NUMFRAMES=6 RATE=18.0

#exec MESH SEQUENCE MESH=FlameTrackerOV SEQ=All STARTFRAME=0 NUMFRAMES=41
#exec MESH SEQUENCE MESH=FlameTrackerOV SEQ=Still STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=FlameTrackerOV SEQ=Fire STARTFRAME=0 NUMFRAMES=2 RATE=6.0
#exec MESH SEQUENCE MESH=FlameTrackerOV SEQ=AltFire STARTFRAME=20 NUMFRAMES=10 RATE=5.0
#exec MESH SEQUENCE MESH=FlameTrackerOV SEQ=Select STARTFRAME=30 NUMFRAMES=6 RATE=9.0 GROUP=Select
#exec MESH SEQUENCE MESH=FlameTrackerOV SEQ=Down STARTFRAME=35 NUMFRAMES=6 RATE=18.0

#exec MESH SEQUENCE MESH=FlameTrackerR SEQ=All STARTFRAME=0 NUMFRAMES=41
#exec MESH SEQUENCE MESH=FlameTrackerR SEQ=Still STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=FlameTrackerR SEQ=Fire STARTFRAME=0 NUMFRAMES=2 RATE=6.0
#exec MESH SEQUENCE MESH=FlameTrackerR SEQ=AltFire STARTFRAME=20 NUMFRAMES=10 RATE=5.0
#exec MESH SEQUENCE MESH=FlameTrackerR SEQ=Select STARTFRAME=30 NUMFRAMES=6 RATE=9.0 GROUP=Select
#exec MESH SEQUENCE MESH=FlameTrackerR SEQ=Down STARTFRAME=35 NUMFRAMES=6 RATE=18.0

#exec MESH SEQUENCE MESH=FlameTrackerROV SEQ=All STARTFRAME=0 NUMFRAMES=41
#exec MESH SEQUENCE MESH=FlameTrackerROV SEQ=Still STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=FlameTrackerROV SEQ=Fire STARTFRAME=0 NUMFRAMES=2 RATE=6.0
#exec MESH SEQUENCE MESH=FlameTrackerROV SEQ=AltFire STARTFRAME=20 NUMFRAMES=10 RATE=5.0
#exec MESH SEQUENCE MESH=FlameTrackerROV SEQ=Select STARTFRAME=30 NUMFRAMES=6 RATE=9.0 GROUP=Select
#exec MESH SEQUENCE MESH=FlameTrackerROV SEQ=Down STARTFRAME=35 NUMFRAMES=6 RATE=18.0

#exec MESH SEQUENCE MESH=FlameTrackerFXThird SEQ=All STARTFRAME=0 NUMFRAMES=41
#exec MESH SEQUENCE MESH=FlameTrackerFXThird SEQ=Still STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=FlameTrackerFXThird SEQ=Fire STARTFRAME=0 NUMFRAMES=2 RATE=6.0
#exec MESH SEQUENCE MESH=FlameTrackerFXThird SEQ=AltFire STARTFRAME=20 NUMFRAMES=10 RATE=5.0
#exec MESH SEQUENCE MESH=FlameTrackerFXThird SEQ=Select STARTFRAME=30 NUMFRAMES=6 RATE=9.0 GROUP=Select
#exec MESH SEQUENCE MESH=FlameTrackerFXThird SEQ=Down STARTFRAME=35 NUMFRAMES=6 RATE=18.0

#exec MESH SEQUENCE MESH=FlameTrackerFXPick SEQ=All STARTFRAME=0 NUMFRAMES=41
#exec MESH SEQUENCE MESH=FlameTrackerFXPick SEQ=Still STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=FlameTrackerFXPick SEQ=Fire STARTFRAME=0 NUMFRAMES=2 RATE=6.0
#exec MESH SEQUENCE MESH=FlameTrackerFXPick SEQ=AltFire STARTFRAME=20 NUMFRAMES=10 RATE=5.0
#exec MESH SEQUENCE MESH=FlameTrackerFXPick SEQ=Select STARTFRAME=30 NUMFRAMES=6 RATE=9.0 GROUP=Select
#exec MESH SEQUENCE MESH=FlameTrackerFXPick SEQ=Down STARTFRAME=35 NUMFRAMES=6 RATE=18.0

#exec MESH SEQUENCE MESH=FlameTrackerPick SEQ=Still STARTFRAME=0 NUMFRAMES=1

#exec MESH SEQUENCE MESH=FlameTrackerM SEQ=Still STARTFRAME=0 NUMFRAMES=1


//-----------------------------------------------------------------------------------

//Scale
#exec MESHMAP NEW MESHMAP=FlameTracker MESH=FlameTracker
#exec MESHMAP SCALE MESHMAP=FlameTracker X=0.088 Y=0.088 Z=0.176

#exec MESHMAP NEW MESHMAP=FlameTrackerOV MESH=FlameTrackerOV
#exec MESHMAP SCALE MESHMAP=FlameTrackerOV X=0.088 Y=0.088 Z=0.176

#exec MESHMAP NEW MESHMAP=FlameTrackerR MESH=FlameTrackerR
#exec MESHMAP SCALE MESHMAP=FlameTrackerR X=0.088 Y=0.088 Z=0.176

#exec MESHMAP NEW MESHMAP=FlameTrackerROV MESH=FlameTrackerROV
#exec MESHMAP SCALE MESHMAP=FlameTrackerROV X=0.088 Y=0.088 Z=0.176

#exec MESHMAP NEW MESHMAP=FlameTrackerPick MESH=FlameTrackerPick
#exec MESHMAP SCALE MESHMAP=FlameTrackerPick X=0.088 Y=0.088 Z=0.176

#exec MESHMAP NEW MESHMAP=FlameTrackerM MESH=FlameTrackerM
#exec MESHMAP SCALE MESHMAP=FlameTrackerM X=0.088 Y=0.088 Z=0.176

#exec MESHMAP NEW MESHMAP=FlameTrackerFXThird MESH=FlameTrackerFXThird
#exec MESHMAP SCALE MESHMAP=FlameTrackerFXThird X=0.088 Y=0.088 Z=0.176

#exec MESHMAP NEW MESHMAP=FlameTrackerFXPick MESH=FlameTrackerFXPick
#exec MESHMAP SCALE MESHMAP=FlameTrackerFXPick X=0.088 Y=0.088 Z=0.176

//-----------------------------------------------------------------------------------

//Skins

#exec TEXTURE IMPORT NAME=Sk_FlameT_01 FILE=SKINS\Sk_FlameT_01.bmp GROUP=Skins FLAGS=2 LODSET=2
#exec MESHMAP SETTEXTURE MESHMAP=FlameTracker NUM=1 TEXTURE=Sk_FlameT_01
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerR NUM=1 TEXTURE=Sk_FlameT_01
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerPick NUM=1 TEXTURE=Sk_FlameT_01
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerM NUM=1 TEXTURE=Sk_FlameT_01

#exec TEXTURE IMPORT NAME=Sk_FlameT_02 FILE=SKINS\Sk_FlameT_02.bmp GROUP=Skins FLAGS=2 LODSET=2
#exec MESHMAP SETTEXTURE MESHMAP=FlameTracker NUM=2 TEXTURE=Sk_FlameT_02
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerR NUM=2 TEXTURE=Sk_FlameT_02
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerPick NUM=2 TEXTURE=Sk_FlameT_02
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerM NUM=2 TEXTURE=Sk_FlameT_02

#exec TEXTURE IMPORT NAME=Sk_FlameT_03 FILE=SKINS\Sk_FlameT_03.bmp GROUP=Skins FLAGS=2 LODSET=2
#exec MESHMAP SETTEXTURE MESHMAP=FlameTracker NUM=3 TEXTURE=Sk_FlameT_03
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerR NUM=3 TEXTURE=Sk_FlameT_03
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerPick NUM=3 TEXTURE=Sk_FlameT_03
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerM NUM=3 TEXTURE=Sk_FlameT_03

#exec TEXTURE IMPORT NAME=Sk_FlameT_04 FILE=SKINS\Sk_FlameT_04.bmp GROUP=Skins FLAGS=2 LODSET=2
#exec MESHMAP SETTEXTURE MESHMAP=FlameTracker NUM=4 TEXTURE=Sk_FlameT_04
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerR NUM=4 TEXTURE=Sk_FlameT_04
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerPick NUM=4 TEXTURE=Sk_FlameT_04
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerM NUM=4 TEXTURE=Sk_FlameT_04

#exec TEXTURE IMPORT NAME=Sk_FlameT_05 FILE=SKINS\Sk_FlameT_05.bmp GROUP=Skins FLAGS=2 LODSET=2
#exec MESHMAP SETTEXTURE MESHMAP=FlameTracker NUM=5 TEXTURE=Sk_FlameT_05
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerR NUM=5 TEXTURE=Sk_FlameT_05
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerPick NUM=5 TEXTURE=Sk_FlameT_05
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerM NUM=5 TEXTURE=Sk_FlameT_05

#exec TEXTURE IMPORT NAME=Sk_FlameT_06 FILE=SKINS\Sk_FlameT_06.bmp GROUP=Skins FLAGS=2 LODSET=2
#exec MESHMAP SETTEXTURE MESHMAP=FlameTracker NUM=6 TEXTURE=Sk_FlameT_06
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerR NUM=6 TEXTURE=Sk_FlameT_06
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerPick NUM=6 TEXTURE=Sk_FlameT_06
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerM NUM=6 TEXTURE=Sk_FlameT_06

#exec TEXTURE IMPORT NAME=TranslucentInvisible FILE=SKINS\TranslucentInvisible.bmp GROUP=Skins FLAGS=2 LODSET=2
#exec MESHMAP SETTEXTURE MESHMAP=FlameTracker NUM=7 TEXTURE=TranslucentInvisible
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerR NUM=7 TEXTURE=TranslucentInvisible
#exec MESHMAP SETTEXTURE MESHMAP=FlameTrackerM NUM=7 TEXTURE=TranslucentInvisible

#exec OBJ LOAD FILE=Textures\NaliEffects.utx PACKAGE=NaliWeaponsII.GFX

//--------------------------------------------------------------

//Icons
#exec TEXTURE IMPORT NAME=FlameTIcon FILE=ICONS\FlameTIcon.bmp GROUP=Icons MIPS=OFF

#exec OBJ LOAD FILE=Textures\NaliIcons.utx PACKAGE=NaliWeaponsII.Icons

//--------------------------------------------------------------

//Sounds
#exec AUDIO IMPORT NAME="FlameTAltFire" FILE=SOUNDS\FlameTAltFire.wav GROUP="FlameT"
#exec AUDIO IMPORT NAME="FlameTSelect" FILE=SOUNDS\FlameTSelect.wav GROUP="FlameT"
#exec AUDIO IMPORT NAME="PosFireSteam" FILE=SOUNDS\PosFireSteam.wav GROUP="FlameT"
#exec AUDIO IMPORT NAME="PosSelectFire" FILE=SOUNDS\PosSelectFire.wav GROUP="FlameT"
#exec AUDIO IMPORT NAME="FlameTPick" FILE=SOUNDS\FlameTPick.wav GROUP="FlameT"
#exec AUDIO IMPORT NAME="Flamming" FILE=SOUNDS\Flamming.wav GROUP="FlameT"


var bool bPosSelect, bPosFire;

function PreBeginPlay()
{
	Super.PreBeginPlay();
	if ((Level.Game.IsA('MonsterHunt') && Class'NWMutator'.Default.EnableMonsterHuntMode && Class'NWMutator'.Default.MonsterHuntOnly) || (Class'NWMutator'.Default.EnableMonsterHuntMode && !Class'NWMutator'.Default.MonsterHuntOnly))
	{
		PickupAmmoCount *= Class'NWMutator'.default.ammo_FlameT;
	}
}

function setHand(float Hand)
{
	Super.SetHand(Hand);
	if ( Hand == 1 )
		Mesh = mesh'FlameTracker';
	else
		Mesh = mesh'FlameTrackerR';
}

function DropFrom(vector StartLocation)
{
	Super.DropFrom(StartLocation);
	AmbientSound = None;
}

simulated function PlayPostSelect()
{
	MultiSkins[7] = FireTexture'FireFT';
	Owner.PlaySound(Sound'PosSelectFire', SLOT_Misc, Pawn(Owner).SoundDampening);
	SetTimer(2.0, False);
	
	Super.PlayPostSelect();
}


function Fire( float Value )
{
local Projectile pj;

    if ( (AmmoType == None) && (AmmoName != None) )
    {
        // ammocheck
        GiveAmmo(Pawn(Owner));
    }

    if (bInfinity)
    {
	GotoState('NormalFire');
        bPointing=True;
        bCanClientFire = true;
        ClientFire(Value);

        if ( bRapidFire || (FiringSpeed > 0) )
            Pawn(Owner).PlayRecoil(FiringSpeed);

        pj = ProjectileFire(ProjectileClass, ProjectileSpeed, bWarnTarget);
	
	if (pj.IsA('Flames'))
	{
		Flames(pj).Kickback = Kickback;
		Flames(pj).MoreDamage = MoreDamage + FireRateChange;
		Flames(pj).HealthGiver = HealthGiver;
		Flames(pj).Splasher = Splasher;
	}
		
    }	
    else if (AmmoType.UseAmmo(1))
    {
        GotoState('NormalFire');
        bPointing=True;
        bCanClientFire = true;
        ClientFire(Value);

        if ( bRapidFire || (FiringSpeed > 0) )
            Pawn(Owner).PlayRecoil(FiringSpeed);

	pj = ProjectileFire(ProjectileClass, ProjectileSpeed, bWarnTarget);

        if (pj.IsA('Flames'))
	{
		Flames(pj).Kickback = Kickback;
		Flames(pj).MoreDamage = MoreDamage + FireRateChange;
		Flames(pj).HealthGiver = HealthGiver;
		Flames(pj).Splasher = Splasher;
	}
    }	
}



simulated function PlayFiring()
{
	PlayAnim('Fire', 2.0, 0.0);
	SoundVolume = Pawn(Owner).SoundDampening*255;
	AmbientSound = Sound'Flamming';
}


function AltFire( float Value )
{
local Projectile pj;

    if ( (AmmoType == None) && (AmmoName != None) )
    {
        // ammocheck
        GiveAmmo(Pawn(Owner));
    }

    if (bInfinity)
    {
	GotoState('AltFiring');
        bPointing=True;
        bCanClientFire = true;
        ClientAltFire(Value);

        /*if ( bRapidFire || (FiringSpeed > 0) )
            Pawn(Owner).PlayRecoil(FiringSpeed);*/

	if (!Class'NWMutator'.default.bFlameTFireBall)
	{

        pj = ProjectileFire(AltProjectileClass, AltProjectileSpeed, bAltWarnTarget);
	
	if (pj.IsA('FlameTBall'))
	{
		FlameTBall(pj).Kickback = Kickback;
		FlameTBall(pj).MoreDamage = MoreDamage;
		FlameTBall(pj).HealthGiver = HealthGiver;
		FlameTBall(pj).Splasher = Splasher;
	}

	}
	else
	{

	pj = ProjectileFire(Class'FireBall', AltProjectileSpeed, bAltWarnTarget);
	
	FireBall(pj).Kickback = Kickback;
	FireBall(pj).MoreDamage = MoreDamage;
	FireBall(pj).HealthGiver = HealthGiver;
	FireBall(pj).Splasher = Splasher;

	}
		
    }	
    else if (AmmoType.UseAmmo(30))
    {
        GotoState('AltFiring');
        bPointing=True;
        bCanClientFire = true;
        ClientAltFire(Value);

        /*if ( bRapidFire || (FiringSpeed > 0) )
            Pawn(Owner).PlayRecoil(FiringSpeed);*/

	if (!Class'NWMutator'.default.bFlameTFireBall)
	{

        pj = ProjectileFire(AltProjectileClass, AltProjectileSpeed, bAltWarnTarget);
	
	if (pj.IsA('FlameTBall'))
	{
		FlameTBall(pj).Kickback = Kickback;
		FlameTBall(pj).MoreDamage = MoreDamage;
		FlameTBall(pj).HealthGiver = HealthGiver;
		FlameTBall(pj).Splasher = Splasher;
	}
	
	}
	else
	{

	pj = ProjectileFire(Class'FireBall', AltProjectileSpeed, bAltWarnTarget);
	
	FireBall(pj).Kickback = Kickback;
	FireBall(pj).MoreDamage = MoreDamage;
	FireBall(pj).HealthGiver = HealthGiver;
	FireBall(pj).Splasher = Splasher;

	}
    }
	else PlayOwnedSound(Sound'PosFireSteam', SLOT_None, Pawn(Owner).SoundDampening*3.0);
	
}


simulated function PlayAltFiring()
{
	PlayOwnedSound(AltFireSound, SLOT_None, Pawn(Owner).SoundDampening*3.0);
	PlayAnim('AltFire', FireRateChange * 2.0, 0.0);
}


simulated function Timer()
{
	if (!bCanClientFire)
	{
		bCanClientFire = True;
		if ( Pawn(Owner).bFire != 0 )
            Global.ClientFire(0);
        else if ( Pawn(Owner).bAltFire != 0 )
            Global.ClientAltFire(0);
	}
	MultiSkins[7] = Texture'TranslucentInvisible';
}

simulated function Tick( float DeltaTime)
{
	If (Owner == None)
		AmbientSound = None;
	else if (Pawn(Owner).bFire == 0)
		AmbientSound = None;

	if ((CurrentPickFX != None || CurrentModFX != None) && ThirdPersonMesh != Mesh'FlameTrackerFXThird')
	{
		ThirdPersonMesh = Mesh'FlameTrackerFXThird';
		PickupViewMesh = Mesh'FlameTrackerFXPick';
	}
	else if (CurrentPickFX == None && CurrentModFX == None && ThirdPersonMesh == Mesh'FlameTrackerFXThird')
	{
		ThirdPersonMesh = Default.ThirdPersonMesh;
		PickupViewMesh = Default.PickupViewMesh;
	}
	
	Super.Tick(DeltaTime);
}

simulated function TweenDown()
{
	Super.TweenDown();
	AmbientSound = None;
}


function float RateSelf( out int bUseAltMode )
{
	local float EnemyDist, Rating;
	local bool bRetreating;
	local vector EnemyDir;
	local Pawn P;

	P = Pawn(Owner);

	//No enemy, no need to fire
	if ( P.Enemy == None )
        	return AIRating;

	//Don't recommend self if out of ammo or if inside water
	if ( AmmoType.AmmoAmount <=0 || P.Enemy.Region.Zone.bWaterZone || P.Region.Zone.bWaterZone)
        	return -2;

	EnemyDir = P.Enemy.Location - Owner.Location; 
	EnemyDist = VSize(EnemyDir);

	//Don't recommend second mode if it hasn't ammo for it and other conditions
	if (AmmoType.AmmoAmount < 30 || EnemyDist < 520 )
		bUseAltMode = 0;
	else
		bUseAltMode = int(FRand() + 0.5);

	return (AIRating + FRand() * 0.05);
}


state NormalFire
{
	function Tick( float DeltaTime )
    	{
        if (Owner==None) 
            AmbientSound = None;
    	}


	function AnimEnd()
    	{
		AmbientSound = None;
		Super.AnimEnd();
	}
}


state AltFiring
{

	function AnimEnd()
    {
		MultiSkins[7] = FireTexture'SmokeFT';
		Owner.PlaySound(Sound'PosFireSteam', SLOT_Misc, Pawn(Owner).SoundDampening);
		bCanClientFire = False;
		SetTimer(2.0 / FireRateChange, False);
	}

	simulated function Timer()
	{
		bCanClientFire = True;
		MultiSkins[7] = Texture'TranslucentInvisible';
		Finish();
	}
}

state ClientAltFiring
{
    simulated function AnimEnd()
    {
		MultiSkins[7] = FireTexture'SmokeFT';
		Owner.PlaySound(Sound'PosFireSteam', SLOT_Misc, Pawn(Owner).SoundDampening);
		SetTimer(2.0 / FireRateChange, False);
		bCanClientFire = False;

		Super.AnimEnd();
    }
}


defaultproperties
{
	bSpecialOverlayer=True
	SpecialOvMeshR=FlameTrackerROV
	SpecialOvMeshL=FlameTrackerOV
	DrawType=DT_Mesh
	Mesh=FlameTrackerPick
	CollisionHeight=10.000000
	CollisionRadius=16.000000
	AutoSwitchPriority=3
	Icon=FlameTIcon
	InventoryGroup=3
	ItemArticle="a"
	ItemName="Flame Tracker"
	MaxDesireability=0.500000
	PickupMessage="You got the Flame Tracker."
	PickupSound=FlameTPick
	PickupViewMesh=FlameTrackerPick
	PickupViewScale=1.000000
	PlayerViewMesh=FlameTrackerR
	PlayerViewOffset=(X=35.000000,Y=-16.000000,Z=-18.000000)
	PlayerViewScale=1.000000
	RespawnTime=30.000000
	StatusIcon=FlameTIcon
	ThirdPersonMesh=FlameTrackerM
	ThirdPersonScale=0.900000
	AltDamageType="Burned"
	AltFireSound=FlameTAltFire
	AltProjectileClass=Class'FlameTBall'
	AmmoName=FlameAmmo
	bRapidFire=True
	DeathMessage="%o was burned to death by %k's %w."
	FireOffset=(X=-5.000000,Y=4.000000,Z=18.000000)
	FireSound=None
	FiringSpeed=1.000000
	MaxTargetRange=4096.000000
	MyDamageType="Burned"
	NameColor=(R=255,G=0,B=0)
	PickupAmmoCount=40
	ProjectileClass=Class'Flames'
	SelectSound=FlameTSelect
	shakemag=150.000000
	shaketime=0.100000
	shakevert=3.000000
	AIRating=0.300000
	AltRefireRate=1.000000
	bAltWarnTarget=False
	bRecommendAltSplashDamage=True
	bRecommendSplashDamage=False
	bSplashDamage=False
	bWarnTarget=True
	RefireRate=1.200000
	Mass=50.000000
	bNoSmooth=False
	bOwnsCrossHair=True
	CustomCross=FlameCross
	CrossHairSize=64
	LightBrightness=100
	LightRadius=4
	LightType=LT_Steady
}
