ACTOR Rocket_Launcher : BrutalWeapon Replaces RocketLauncher
{
	Game Doom
	SpawnID 29
	Speed 20
	Damage 20
	Weapon.SelectionOrder 9500
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 0
	Weapon.AmmoGive1 0
	Weapon.AmmoType1 "AmmoRocket"
	Weapon.AmmoType2 "RocketRounds"
    Inventory.PickupSound "ROCKPKUP"
    +WEAPON.NOAUTOAIM
	+FORCEXYBILLBOARD
	+WEAPON.AXEBLOOD
	+WEAPON.EXPLOSIVE
	+WEAPON.NOAUTOFIRE
	+WEAPON.NOALERT
	Inventory.PickupMessage "$GOTLAUNCHER"
	Tag "Rocket Launcher"
	States
	{
	
	Ready3:
	Ready:
	    RLNG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("Unloading",1,"Unload")
        RLNG A 0 A_JumpIfInventory("Reloading",1,"Reload")
        RLNG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RLNG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		RLNG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        RLNG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		RLNG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		RLNG A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		RLNG A 0 A_JumpIfInventory("HasUnloadedRL", 1, "ReadyNoAmmo")
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		Loop
		
	Ready2:
		SNIP A 1 BRIGHT A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RLNG A 0 A_JumpIfInventory("Unloading",1,"Unload")
		RLNG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        RLNG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		RLNG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		RLNG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		RLNG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RLNG A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		RLNG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		Loop	
		
	ReadyNoAmmo:
	    MISR J 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("Unloading",1,"Unload")
        RLNG A 0 A_JumpIfInventory("Reloading",1,"Reload")
        RLNG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RLNG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		RLNG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        RLNG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		RLNG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		RLNG A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		Loop	
	
	NoAmmo:
		RIFG A 0
		RLNG A 0 A_Takeinventory("PowerLightAmp", 1)
		RIFG A 0 A_ZoomFactor(1.0)
		RIFG A 0 A_Takeinventory("Zoomed",1)
		RIFG A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_JumpIfInventory("TurboReload",1,"TurboReload")
		TNT1 A 0 A_PlaySound("weapons/empty", 4)
		NoAmmo2:
		RIFG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
	    RIFG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		RIFG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		RIFG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		RIFG A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		RIFG A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		RIFG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RLNG A 5 A_WeaponReady(WRF_ALLOWRELOAD | WRF_NOPRIMARY)
		RIFG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RIFG A 0 A_JumpIfInventory("TurboReload",1,"TurboReload")
		TNT1 A 0 A_JumpIfInventory("NoAutoReload", 1, "NoAmmo2")
		RIFG A 0 A_JumpIfInventory("AmmoRocket",1,"Reload")
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"NoAmmo2")
		Goto Ready3
	
	CheckSprint:
		RLNG A 1 A_WeaponReady(WRF_NOFIRE)
		RLNG A 0 A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		RLNG A 0 A_JumpIfInventory("IsTacticalClass", 1, "StartSprint")
		Goto Ready
		
	StartSprint:
		RLNG A 1 A_WeaponReady(WRF_NOFIRE)
		RLNG A 0 A_Takeinventory("Zoomed",1)
		RLNG A 0 A_Takeinventory("ADSmode",1)
		RLNG A 0 A_Takeinventory("PowerLightAmp", 1)
		RLNG A 0 A_ZoomFactor(1.0)
		RLNG A 0 A_JumpIfInventory("UsedStamina", 40, "StopSprintTired")
		
	Sprinting:	
		MISP A 0 offset(-9,32) 
		RLNG A 0 offset(-9,32) A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		RLNG A 0 offset(-9,32) A_JumpIfInventory("UsedStamina", 100, "StopSprintTired")
		PLAY A 0 offset(-9,32) ACS_ExecuteAlways(852, 0, 0, 0, 0)//Makes player faster.
		RLNG A 0 offset(-9,32) A_JumpIfInventory("PowerStrength", 1, 2)
		RLNG A 0 offset(-9,32) A_GiveInventory("UsedStamina", 8)
		RLNG A 0 offset(-9,32)
		MISP A 1 offset(-9,34) A_SetPitch(pitch -0.5)
		MISP A 1 offset(-6,36) A_SetPitch(pitch -0.5)
		MISP A 1 offset(-3,38) A_SetPitch(pitch -0.5)
		MISP A 1 offset(0,38) A_SetPitch(pitch -0.5)
		MISP A 1 offset(3,36) A_SetPitch(pitch -0.5)
		MISP A 1 offset(6,34) A_SetPitch(pitch -0.5)
		MISP A 1 offset(9,32) A_SetPitch(pitch -0.5)
		RLNG A 0 offset(9,32) A_WeaponReady(WRF_NOBOB)
		RLNG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        RLNG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        RLNG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RLNG A 0 offset(-9,32) A_GiveInventory("UsedStamina", 8)
		RLNG A 0 offset(9,33) A_SpawnItemEx("FootStep", 0, 0, 2, 0, 0, -4)
		MISP A 1 offset(9,34) A_SetPitch(pitch +0.5)
		MISP A 1 offset(6,36) A_SetPitch(pitch +0.5)
		MISP A 1 offset(3,38) A_SetPitch(pitch +0.5)
		MISP A 1 offset(0,38) A_SetPitch(pitch +0.5)
		MISP A 1 offset(-3,36) A_SetPitch(pitch +0.5)
		MISP A 1 offset(-6,34) A_SetPitch(pitch +0.5)
		MISP A 1 offset(-9,32) A_SetPitch(pitch +0.5)
		RLNG A 0 offset(-9,32) A_WeaponReady(WRF_NOBOB)
		RLNG A 0 offset(-9,32) A_JumpIfInventory("IsRunning", 1, "Sprinting")
		
		Goto StopSprint
	StopSprintTired:
		RLNG A 1
		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		RLNG A 0 A_PlaySound("Tired", 2)
		RLNG A 0 A_TakeInventory("UsedStamina", 2)
		RLNG A 5 A_WeaponReady
		RLNG A 0 A_TakeInventory("UsedStamina", 2)
		RLNG A 5 A_WeaponReady
		RLNG A 0 A_TakeInventory("UsedStamina", 2)
		RLNG A 5 A_WeaponReady
		RLNG A 0 A_TakeInventory("UsedStamina", 2)
		RLNG A 5 A_WeaponReady
		RLNG A 0 A_TakeInventory("UsedStamina", 2)
		RLNG A 5 A_WeaponReady
		Goto Ready
	StopSprint:
		MISP A 1
		RLNG A 0 A_JumpIfInventory("UsedStamina", 60, "StopSprintTired")
		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		Goto Ready
		
	Deselect:
        RLNG A 0
		RLNG A 0 A_Takeinventory("Zoomed",1)
		RLNG A 0 A_Takeinventory("PowerLightAmp", 1)
        RLNG A 0 A_ZoomFactor(1.0)
		RLNG A 0 A_TakeInventory("TossGrenade", 1)
		MISS DCBA 1
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1 A_Lower
		Wait
	Select:
		RLNG A 0 A_Giveinventory("GoSpecial",1)
		RLNG A 0 A_Takeinventory("FistsSelected",1)
		RLNG A 0 A_Takeinventory("SawSelected",1)
		RLNG A 0 A_Takeinventory("ShotgunSelected",1)
		RLNG A 0 A_Takeinventory("SSGSelected",1)
		RLNG A 0 A_Takeinventory("MinigunSelected",1)
		RLNG A 0 A_Takeinventory("PlasmaGunSelected",1)
		//RLNG A 0 A_Giveinventory("RocketLauncherSelected",1)
		RLNG A 0 A_Giveinventory("RocketLauncherSelected",1)
		RLNG A 0 A_Takeinventory("GrenadeLauncherSelected",1)
		RLNG A 0 A_Takeinventory("BFGSelected",1)
		RLNG A 0 A_Takeinventory("BFG10kSelected",1)
		RLNG A 0 A_Takeinventory("RailGunSelected",1)
		RLNG A 0 A_Takeinventory("SubMachineGunSelected",1)
		RLNG A 0 A_Takeinventory("RevenantLauncherSelected",1)
		RLNG A 0 A_Takeinventory("LostSoulSelected",1)
		RLNG A 0 A_Takeinventory("FlameCannonSelected",1)
		RLNG A 0 A_Takeinventory("HasBarrel",1)
		RLNG A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 AAAAAA 0 A_RAise
		TNT1 A 1 A_Raise
		RLNG A 0 A_GunFlash
		RLNG A 0
		RLNG A 0 A_JumpIfInventory("IsPlayingAsPurist", 1, "PuristGun")
        TNT1 A 2 A_PlaySound("RLANDRAW")
		SelectAnimation:
        MISS ABCD 1 A_JumpIfInventory("GoFatality", 1, "Steady")
		
        TNT1 AAAAA 0
        Goto Ready
		
	Fire:
		RLNG A 0
        RLNG A 0 A_JumpIfInventory("RocketRounds",1,2)
        Goto NoAmmo
        TNT1 AAAA 0
		RLNG A 0 A_ALertMonsters
		RLNG A 0 A_JumpIfInventory("Zoomed",1,"ZoomedFire")
		RLNG A 1
		
		RLNG A 0 A_JumpIfInventory("DMgame",1,"DM")
		RLNG A 0 A_FireCustomMissile("RedFlareSpawn",-5,0,0,0)
        RLNG A 0 A_PlaySound ("DSRFIRE")
		RLNG A 0 BRIGHT A_FireCustomMissile("Alerter")
		RLNG A 0 A_ZoomFactor(0.98)
		RLNF A 1 BRIGHT
		RLNG A 0 A_FireCustomMissile("Rocket2", 0, 1, 0, -6)
		RLNG A 0 A_FireCustomMissile("RocketGlassBreaker", 0, 1, 0, -6) 
		Goto RecoilAnimation
		
	DM:	
		RLNG A 0 A_FireCustomMissile("RedFlareSpawn",-5,0,0,0)
        RLNG A 0 A_PlaySound ("DSRFIRE")
		RLNG A 0 A_ZoomFactor(0.98)
		RLNF A 1 BRIGHT A_FireCustomMissile("RocketDM", 0, 1, 0, -6)
		RLNG A 0 A_FireCustomMissile("RocketGlassBreaker", 0, 1, 0, -6) 
		
	RecoilAnimation:	
		RLNG A 0 A_Takeinventory("RocketRounds",1)
		RLNG A 0 A_ZoomFactor(1.0)
		RLNF B 1 BRIGHT A_WeaponReady(WRF_NOFIRE| WRF_NOBOB)//Allows quick switch
        RLNF C 1 
        RLNF D 1 A_WeaponReady(WRF_NOFIRE| WRF_NOBOB)//Allows quick switch
		RLNF E 1 
		RLNF FGH 1 
		
		RLNG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RLNG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		RLNG AAA 1 A_WeaponReady(WRF_NOFIRE | WRF_NOBOB | WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RLNG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		RLNG BCD 2 A_WeaponReady(WRF_NOFIRE| WRF_NOBOB | WRF_ALLOWRELOAD)//Allows quick switch
        RLNG A 1
        RLNG A 0 A_Refire
        Goto Ready
		
		
	ZoomedFire:	
		SNIP A 1
		RLNG A 0 A_JumpIfInventory("DMgame",1,"ZoomedFireDM")
		RLNG A 0 A_FireCustomMissile("RedFlareSpawn",-5,0,0,0)
        RLNG A 0 A_PlaySound ("DSRFIRE")
		RLNG A 0 BRIGHT A_FireCustomMissile("Alerter")
		RLNG A 0 A_ZoomFactor(2.9)
		SNIP A 1 BRIGHT
		RLNG A 0 A_FireCustomMissile("Rocket2", 0, 1, 0, -6)
		RLNG A 0 A_FireCustomMissile("RocketGlassBreaker", 0, 1, 0, -6) 
		Goto ZoomedRecoil
		
	ZoomedFireDM:	
		RLNG A 0 A_FireCustomMissile("RedFlareSpawn",-5,0,0,0)
        RLNG A 0 A_PlaySound ("DSRFIRE")
		RLNG A 0 A_ZoomFactor(2.9)
		SNIP A 1 BRIGHT A_FireCustomMissile("RocketDM", 0, 1, 0, -6)
		RLNG A 0 A_FireCustomMissile("RocketGlassBreaker", 0, 1, 0, -6) 
		
	ZoomedRecoil:	
		RLNG A 0 A_Takeinventory("RocketRounds",1)
		RLNG A 0 A_ZoomFactor(3.0)
		SNIP A 1 BRIGHT
        SNIP A 1 BRIGHT A_SetPitch(-0.6 + pitch)
        SNIP A 1 BRIGHT
		SNIP A 1 BRIGHT
		SNIP AAA 1 BRIGHT A_SetPitch(0.1 + pitch)
		SNIP AAA 1 BRIGHT A_SetPitch(0.1 + pitch)
		SNIP AAA 2 BRIGHT
        SNIP A 1 BRIGHT
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RLNG A 0 A_JumpIfInventory("FiredSecondary",1,"HoldAim")//If still pressing alt fire, it means its holding aim
        RLNG A 0 A_Refire
        Goto Ready2	
	
    Reload:
		RLNG A 0
		RLNG A 0 A_Takeinventory("Reloading",1)
		RLNG A 0 A_ZoomFactor(1.0)
		RLNG A 0 A_TakeInventory("Zoomed", 1)
		RLNG A 0 A_Takeinventory("PowerLightAmp", 1)
		RLNG A 0 A_JumpIfInventory("HasUnloadedRL", 1, 26)
		RLNG A 1 A_WeaponReady(WRF_NOFIRE)
        RLNG A 0 A_JumpIfInventory("RocketRounds",6,"NoNeedToReload")
        RLNG A 0 A_JumpIfInventory("AmmoRocket",1,3)
        Goto Ready
        TNT1 AAAA 0
		
		RLNG A 0 A_JumpIfInventory("TurboReload",1,"TurboReload")
	
		
        RLNG A 0 A_PlaySound("Reload")
        MISR ABCDE 1 
        RLNG A 0 A_FireCustomMissile("RocketCaseSpawn",-20,0,2,-10)
        MISR EFGGG 1
		MISR HIJJJJKLM 1
        MISR MNOPONM 1
		MISR Q 1
		MISR R 1
		RLNG BCD 2
		RLNG A 1
		RLNG A 0 A_Takeinventory("HasUnloadedRL",1)
		Goto FinishReload
		
		FinishReload:
		TNT1 AAAAAA 0
		RLNG A 0 A_JumpIfInventory("RocketRounds",6,"NoNeedToReload")
		RLNG A 0 A_JumpIfInventory("AmmoRocket",1,3)
		Goto Ready
        TNT1 AAAAAA 0
		RLNG A 0 A_Giveinventory("RocketRounds",1)
		RLNG A 0 A_Takeinventory("AmmoRocket",1)
		Goto FinishReload
		
		TNT1 AAAAAAAAAA 0
		
		NoNeedToReload:
        RLNG A 1 A_Refire
        Goto Ready
		
		
	TurboReload:
		RLNG A 0 A_Takeinventory("HasUnloaded",1)
        PISS BA 0
        Goto FinishReload	


	Spawn:
		LAUN A -1
		Stop
		
	Unload:
		RLNG A 0
		RLNG A 0 A_Takeinventory("Zoomed",1)
		RLNG A 0 A_Takeinventory("PowerLightAmp", 1)
        RLNG A 0 A_ZoomFactor(1.0)
		RLNG A 0 A_JumpIfInventory("RocketRounds",1,2)
		Goto ReadyNoAMmo
		TNT1 AA 0
		
		RLNG A 1 A_WeaponReady(WRF_NOFIRE)
		RLNG A 0 A_Takeinventory("Unloading",1)
		RLNG A 0 A_ZoomFactor(1.0)
		RLNG A 0 A_TakeInventory("Zoomed", 1)
        RLNG A 0 A_JumpIfInventory("AmmoRocket",1,3)
        Goto Ready
        TNT1 AAAA 0
		
        RLNG A 0 A_PlaySound("Reload")
        MISR ABCDE 1 
        MISR EFGGG 1
		MISR HI 1
		RLNG A 0 A_Giveinventory("HasUnloadedRL",1)
		
		
	FinishUnload:
		TNT1 AAAAAA 0
		RLNG A 0 A_JumpIfInventory("RocketRounds",1,3)
		Goto ReadyNoAMmo
        TNT1 AAAA 0
		RLNG A 0 A_Takeinventory("RocketRounds",1)
		RLNG A 0 A_Giveinventory("AmmoRocket",1)
		Goto FinishUnload
		
		TNT1 AAAAAAAAAA 0
		Goto ReadyNoAMmo

 	
    
	PuristGun:
		TNT1 A 1
		RLNG A 0 A_GiveInventory("ClassicRocketLauncher", 1)
		RLNG A 0 A_TakeInventory("Rocket_Launcher", 1)
		TNT1 A 10
		Goto Ready	
		
		
	 AltFire:
        RLNG A 0
		RLNG A 0 A_JumpIfInventory("Zoomed",1,"NoAim")
		RLNG A 0 A_Giveinventory("Zoomed",1)
        RLNG A 0 A_ZoomFactor(3.0)
		RLNG A 0 A_giveinventory("PowerLightAmp", 1)
        MIAI ABCDE 1
        RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RLNG A 0 A_JumpIfInventory("FiredSecondary",1,"HoldAim")
        Goto Ready2
		
	   HoldAim:	
	    RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredSecondary",1,"HoldAim")
	 NoAim:	
        MIAI EDBA 1
		RLNG A 0 A_Light0
		RLNG A 0 A_Takeinventory("Zoomed",1)
		RLNG A 0 A_Takeinventory("PowerLightAmp", 1)
        RLNG A 0 A_ZoomFactor(1.0)
        Goto Ready	
		

	}
}

ACTOR RocketRounds : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 6
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 6
   Inventory.Icon "RLAUA0"
}












Actor TimeFreezer2 : PowerupGiver
{
  Inventory.Pickupmessage "Time Freezer!"
  Inventory.Icon "MEGAA0"
  Inventory.MaxAmount 0
  Inventory.UseSound "pickups/slowmo"
  Powerup.Type "TimeFreezer"
  Powerup.Duration 50
  Translation "128:143=48:63"
  +AUTOACTIVATE
  +INVENTORY.FANCYPICKUPSOUND
  States
  {
  Spawn:
    MEGA ABCD 4 bright
    Loop
  }
}

ACTOR PowerTimeFreezer2 : PowerTimeFreezer
{
  Powerup.Duration 2
}