
//Fast fire totem variant.
ACTOR Dusk_Sniper_Fastfire : Dusk_Sniper //replaces chainsaw
{
	+NOALERT
	+POWERED_UP 
	Weapon.SisterWeapon Dusk_Sniper
	Weapon.AmmoGive 0
	States
	{

	Deselect:
    TNT1 A 0 A_TakeInventory("SetWeaponMemory",50)
    TNT1 A 0 A_GiveInventory("SetWeaponMemory",9)
		TNT1 A 0 A_TakeInventory("Weapon_Zoom",1)
            TNT1 A 0 A_ZoomFactor (1.0)
	DeselectLoop:
		TST1 AAA 0 A_Lower
		TST1 A 1 A_Lower
		Loop
	Select:
		TNT1 A 0 A_TakeInventory("Weapon_Zoom",1)
            TNT1 A 0 A_ZoomFactor (1.0)
		TNT1 A 0 A_SetCrosshair(15)
    TNT1 A 0 A_TakeInventory("SetWeaponActual",50)
    TNT1 A 0 A_GiveInventory("SetWeaponActual",9)
//		TNT1 A 3 A_WeaponReady//(WRF_NOFIRE)
		W06A ABCDEFGHIJK 1 A_WeaponReady//(WRF_NOFIRE)
		Goto Ready


	Ready:
TNT1 A 0 A_JumpIfInventory("Doosk_ExplosiveBarrelWeapon",1,"Select_Barrel")
TNT1 A 0 A_JumpIfInventory("Doosk_HereticBarrelWeapon",1,"Select_HereticBarrel")
TNT1 A 0 A_JumpIfInventory("Doosk_SoapWeapon",1,"Select_Soap")

				TNT1 A 0 A_JumpIfInventory("Weapon_Zoom", 1, "Ready_Zoom")
            TNT1 A 0 A_ZoomFactor (1.0)
			W06C A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		Loop
	Ready_Zoom:
            TNT1 A 0 A_ZoomFactor (3.5)
			W06L A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		Goto Ready


	Fire:
		W06F A 0 A_Gunflash		TNT1 A 0 A_GiveInventory("Player_WeaponShot",1)
		TNT1 A 0 A_JumpIfInventory("Weapon_Zoom", 1, "Fire_Zoom")
		
	FireNormal:
            TNT1 A 0 A_ZoomFactor (1.0)			TNT1 A 0 A_TakeInventory("Weapon_Zoom", 1)

TNT1 A 0 A_JumpIfInventory("Fastfire_TotemAmount",31,"FireNormal_Stacked2")
		W06F ABCD 1 bright A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		W06F EFGHIJKLMNOPQRSTU 1 A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		W06F VWXYZ 1 A_WeaponReady (WRF_ALLOWRELOAD)
		W06G ABCDEFGHIJKLMNO 1 A_WeaponReady (WRF_ALLOWRELOAD)
		Goto Ready

//If weapon is zoomed in.
	Fire_Zoom:
TNT1 A 0 A_JumpIfInventory("Fastfire_TotemAmount",31,"Fire_Zoom_Stacked2")
		W06J ABCD 1 bright A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		W06J EFGHIJKLMNOPQRSTU 1 A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		W06J VWXYZ 1 A_WeaponReady (WRF_ALLOWRELOAD)
		W06K ABCDEFGHIJKLMNO 1 A_WeaponReady (WRF_ALLOWRELOAD)
		Goto Ready





	FireNormal_Stacked2:

		W06F ABCD 1 bright A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		W06F EFGHIJKL 1 A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		W06F MNOPQRSTUVWXYZ 1 A_WeaponReady (WRF_ALLOWRELOAD)
		W06G ABCDEFGHIJKLMNO 1 A_WeaponReady (WRF_ALLOWRELOAD)
		Goto Ready

//If weapon is zoomed in.
	Fire_Zoom_Stacked2:
		W06J ABCD 1 bright A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		W06J EFGHIJKL 1 A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		W06J MNOPQRSTUVWXYZ 1 A_WeaponReady (WRF_ALLOWRELOAD)
		W06K ABCDEFGHIJKLMNO 1 A_WeaponReady (WRF_ALLOWRELOAD)
		Goto Ready






	AltFire://Allows you to eagle eye =P (I mean, zoom)
		TNT1 A 0 A_PlaySound("weapon/zoom")
		TNT1 A 0 A_JumpIfInventory("Weapon_Zoom", 1, "Zoom_Out")


Zoom_In:
            TNT1 A 0 A_ZoomFactor (3.5)			TNT1 A 0 A_GiveInventory("Weapon_Zoom", 1)
			
		W06H ABCDE 1 A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		W06L A 1 A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_Refire("Zoom_Hold")
		Goto Ready_Zoom


Zoom_Out:
            TNT1 A 0 A_ZoomFactor (1.0)			TNT1 A 0 A_TakeInventory("Weapon_Zoom", 1)
			
		W06L A 1 A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		W06I ABCDE 1 A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_Refire("Zoom_Hold")
		Goto Ready


	Zoom_Hold://Prevents the weapon to keep zooming in and out.
			W06L A 0 A_JumpIfInventory("Weapon_Zoom", 1, 2)
			W06C A 0
		"####" A 1 A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_ReFire("Zoom_Hold")
		Goto Ready


	}
}

