
//Fast fire totem variant.
ACTOR Dusk_Pistol2_Fastfire : Dusk_Pistol2 //replaces pistol
{
	+POWERED_UP 
	Weapon.SisterWeapon Dusk_Pistol2
	Weapon.AmmoGive 0
	States
	{
	Fire:
		W12F A 0 A_Gunflash		TNT1 A 0 A_GiveInventory("Player_WeaponShot",1)
		TNT1 A 0 A_JumpIfInventory("Weapon_Fireleft", 1, "Fire_Left")	 

        TNT1 A 0 A_GiveInventory("Weapon_Fireleft", 1)
		Goto Fire_Continue
		
	Fire_Left:
        TNT1 A 0 A_TakeInventory("Weapon_Fireleft", 2)
		Goto Fire_Continue


	Fire_Continue:
TNT1 A 0 A_JumpIfInventory("Fastfire_TotemAmount",31,"Fire_Stacked2")
			W12F A 0 A_JumpIfInventory("Weapon_Fireleft", 1, 2)
			W12H A 0
		"####" ABC 1 bright A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		"####" DEF 1 bright A_WeaponReady (WRF_ALLOWRELOAD)
		"####" GHIJKLMNOPQRSTUVWXYZ 1 A_WeaponReady (WRF_ALLOWRELOAD)
			W12G A 0 A_JumpIfInventory("Weapon_Fireleft", 1, 2)
			W12I A 0
			"####" ABCDEFGHIJ 1 A_WeaponReady (WRF_ALLOWRELOAD)
		Goto Ready

	Fire_Stacked2:
			W12F A 0 A_JumpIfInventory("Weapon_Fireleft", 1, 2)
			W12H A 0
		"####" AB 1 bright A_WeaponReady (WRF_NOFIRE|WRF_NOSWITCH)
		"####" CDEF 1 bright A_WeaponReady (WRF_ALLOWRELOAD)
		"####" GHIJKLMNOPQRSTUVWXYZ 1 A_WeaponReady (WRF_ALLOWRELOAD)
			W12G A 0 A_JumpIfInventory("Weapon_Fireleft", 1, 2)
			W12I A 0
			"####" ABCDEFGHIJ 1 A_WeaponReady (WRF_ALLOWRELOAD)
		Goto Ready


	}
}


