ACTOR NukeLauncher : BrutalWeapon
{
	Height 20
	Weapon.SelectionOrder 3400
	Weapon.AmmoUse 1
	Weapon.AmmoGive 1
	Weapon.AmmoType "Nuke"
    Inventory.PickupSound "BFGREADY"
	+WEAPON.BFG
	+WEAPON.NOAUTOAIM
	+WEAPON.NOAUTOFIRE
	+WEAPON.EXPLOSIVE
	Inventory.PickupMessage "You got the Nuclear Missile Launcher (Slot 7)"
	Tag "Nuclear Missile Launcher"
	Scale 0.8
	DropItem "NukeLauncherSpawner"
	States
	{
	Ready:
	Ready3:
		NKLG A 1 A_WeaponReady
		NKLG A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
        NKLG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        NKLG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		NKLG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		NKLG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		NKLG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		NKLG A 0 A_JumpIfInventory("IsRunning",1,"StartSprint")
		Goto Ready3

	StartSprint:
		NKLG A 1 A_WeaponReady
		SHTN A 0 A_Takeinventory("Zoomed",1)
        SHTN A 0 A_ZoomFactor(1.0)
		SHTN A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_SetCrosshair(0)
		SHTN A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 ACS_NamedExecuteAlways("BDSprint", 0, 0, 0, 0)//Makes player faster.

	Sprinting:
		NKLG A 1 offset(-9,34) A_SetPitch(pitch -0.5)
		NKLG A 1 offset(-6,36) A_SetPitch(pitch -0.5)
		NKLG A 1 offset(-3,38) A_SetPitch(pitch -0.5)
		NKLG A 1 offset(0,38) A_SetPitch(pitch -0.5)
		NKLG A 1 offset(3,36) A_SetPitch(pitch -0.5)
		NKLG A 1 offset(6,34) A_SetPitch(pitch -0.5)
		NKLG A 1 offset(9,32) A_SetPitch(pitch -0.5)
		TNT1 A 0 A_GiveInventory("UsedStamina", 3)
		SMGG A 0 A_WeaponReady(WRF_NOBOB)
		SMGG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SMGG A 0 A_JumpIfInventory("Taunting",1,"Taunt")

		NKLG A 1 offset(9,34) A_SetPitch(pitch +0.5)
		NKLG A 1 offset(6,36) A_SetPitch(pitch +0.5)
		NKLG A 1 offset(3,38) A_SetPitch(pitch +0.5)
		NKLG A 1 offset(0,38) A_SetPitch(pitch +0.5)
		NKLG A 1 offset(-3,36) A_SetPitch(pitch +0.5)
		NKLG A 1 offset(-6,34) A_SetPitch(pitch +0.5)
		NKLG A 1 offset(-9,32) A_SetPitch(pitch +0.5)
		TNT1 A 0 A_GiveInventory("UsedStamina", 3)
		SMGG A 0 A_WeaponReady(WRF_NOBOB)
		SMGG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SMGG A 0 A_JumpIfInventory("Taunting",1,"Taunt")

		PLAY A 0 ACS_NamedExecuteAlways("BDSprint", 0, 0, 0, 0)//Makes player faster.
		SMGG A 0 A_JumpIfInventory("IsRunning", 1, "Sprinting")
		Goto StopSprint

	StopSprint:
		NKLG A 0 A_JumpIfInventory("PowerStrength", 1, 2)
		NKLG A 0 A_JumpIfInventory("UsedStamina", 100, "StopSprintTired")
		NKLG A 1 ACS_NamedExecuteAlways("BDTacticalSpeed", 0, 0, 0, 0)//Makes player slower.
		Goto Ready

	StopSprintTired:
		NKLG A 1 ACS_NamedExecuteAlways("BDTacticalSpeed", 0, 0, 0, 0)//Makes player slower.
		NKLG A 0 A_PlaySound("Tired", 2)
		Goto Ready

	DryFire:
	    NKLG A 5
		NKLG A 0 A_PlaySound("weapons/empty")
		Goto Ready

	Deselect:
	    NKLG A 0 A_StopSound(CHAN_WEAPON)
		NKLG A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 0 A_TakeInventory("Unloading", 1)
		TNT1 A 0 A_TakeInventory("Reloading", 1)
		TNT1 A 0 A_TakeInventory("StartDualWield",1)
		TNT1 AAAAAAAAAAAA 0 A_Lower
		NKLG AAAA 1 A_Lower
		Loop
	Select:
		NKLG A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 A_TakeInventory("FistsSelected", 1)
		TNT1 A 0 A_TakeInventory("ShotgunSelected", 1)
		TNT1 A 0 A_TakeInventory("MinigunSelected", 1)
		TNT1 A 0 A_TakeInventory("SSGSelected", 1)
		TNT1 A 0 A_GiveInventory("RocketLauncherSelected", 1)
		TNT1 A 0 A_TakeInventory("GrenadeLauncherSelected", 1)
		TNT1 A 0 A_TakeInventory("PlasmaGunSelected", 1)
		TNT1 A 0 A_TakeInventory("RailGunSelected", 1)
		TNT1 A 0 A_TakeInventory("RevenantLauncherSelected", 1)
		TNT1 A 0 A_TakeInventory("SubMachineGunSelected", 1)
		TNT1 A 0 A_TakeInventory("BFG10KSelected", 1)
		TNT1 A 0 A_TakeInventory("BFGSelected", 1)
		TNT1 A 0 A_TakeInventory("FlameCannonSelected", 1)
		TNT1 A 0 A_TakeInventory("SawSelected", 1)
		NKLG A 0 A_Takeinventory("HasBarrel",1)
		NKLG A 0 A_TakeInventory("TossGrenade", 1)
		NKLG A 0 A_GunFlash
		NKLG AAAA 1 A_Raise
		NKLG A 0 A_PlaySound("BFGREADY")
		TNT1 AAAAAAAAAAAA 0 A_Raise
		Goto Ready

    Spawn:
		NKLG D -1
        Stop

   Fire:
        NKLG B 1 BRIGHT
		NKLG A 0 A_PlaySound ("DSRFIRE", 1)
		NKLG A 0 A_PlaySound ("brain/spit", 4)
		TNT1 A 0 A_FireCustomMissile("Alerter",0,0)
		NKLG B 1 BRIGHT
		TNT1 A 0 A_ZoomFactor(0.97)
		NKLG A 0 A_SpawnItemEx("PlayerMuzzle2",32,0,28)
		NKLG A 0 A_FireCustomMissile("NuclearRocket", 0, 1, 0, 0)
		NKLG C 2 BRIGHT
		TNT1 A 0 A_ZoomFactor(1.0)
		NKLG A 5 BRIGHT
		Goto Ready
	}
}