ACTOR Rifle : BrutalWeapon
{
	Weapon.AmmoUse1 0
	Weapon.AmmoGive1 0
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 0
	YScale 0.6
	XScale 0.8
	Weapon.SelectionOrder 2500
	Weapon.AmmoType1 "Clip2"
	Weapon.AmmoType2 "RifleAmmo"
	Obituary "%o was shot down by %k's assault rifle."
    AttackSound "None"
    Inventory.PickupSound "CLIPIN"
	Inventory.Pickupmessage "$GOTRIFLE"
    +WEAPON.NOAUTOAIM
    +WEAPON.NOALERT
	+WEAPON.NOAUTOFIRE
	+FORCEXYBILLBOARD
	Tag "Assault Rifle"
    Scale 0.8
	States
	{
	
		
	TacticalWarning:
		TNT1 A 4
		Goto LetsGetStarted
	WarmUp:
		RIFG A 0
		RIFG A 0 A_TakeInventory("JustStartedGame", 1)
		RIFG A 0 A_JumpIfInventory("IsTacticalClass", 1, "TacticalWarning")
		
	LetsGetStarted:	
		TNT1 A 5 A_WeaponReady
		PUNS ABCD 1 A_WeaponReady
		RIFG A 0 A_PlaySound("Knuckled")
		PUNS E 7 A_WeaponReady
		PUNS FGFE 3 A_WeaponReady
		PUNS DCB 1 A_WeaponReady
		TNT1 A 5 A_WeaponReady
		R2RL ABCDE 1 A_WeaponReady
        R2RL E 1 A_WeaponReady
		RIFR HIKL 1 A_WeaponReady
		RIFG A 0 A_PlaySound("DryFire")
		RIFR M 1 A_WeaponReady
		RIFR NOPQRST 1 A_WeaponReady
		Goto Ready3
	
	
	
	
	
	
	CheckSprint:
		RIFG A 1 A_WeaponReady(WRF_NOFIRE)
		RIFG A 0 A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		RIFG A 0 A_JumpIfInventory("IsTacticalClass", 1, "StartSprint")
		Goto Ready3
		
	CheckSprint2:
		RI2G A 1 A_WeaponReady(WRF_NOFIRE)
		RIFG A 0 A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		RIFG A 0 A_JumpIfInventory("IsTacticalClass", 1, "StartSprint")
		Goto Ready2	
		
	StartSprint:
		RIFG A 1 A_WeaponReady(WRF_NOFIRE)
		RIFG A 0 A_Takeinventory("Zoomed",1)
		RIFG A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_ZoomFactor(1.0)
		RIFG A 0 A_JumpIfInventory("UsedStamina", 40, "StopSprintTired")
		
	Sprinting:	
		RIFG A 0
		RIFG A 0 A_JumpIfInventory("Accelerate", 1, 1)
		Goto Ready3
		RISP A 0 offset(-9,32) 
		RIFG A 0 offset(-9,32) A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		RIFG 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.
		RIFG A 0 offset(-9,32) A_JumpIfInventory("PowerStrength", 1, 2)
		RIFG A 0 offset(-9,32) A_GiveInventory("UsedStamina", 5)
		RIFG A 0 offset(-9,32)
		RISP A 1 offset(-9,34) A_SetPitch(pitch -0.5)
		RISP A 1 offset(-6,36) A_SetPitch(pitch -0.5)
		RISP A 1 offset(-3,38) A_SetPitch(pitch -0.5)
		RISP A 1 offset(0,38) A_SetPitch(pitch -0.5)
		RISP A 1 offset(3,36) A_SetPitch(pitch -0.5)
		RISP A 1 offset(6,34) A_SetPitch(pitch -0.5)
		RISP A 1 offset(9,32) A_SetPitch(pitch -0.5)
		RIFG A 0 offset(9,32) A_WeaponReady(WRF_NOBOB)
		RIFG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        RIFG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        RIFG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RIFG A 0 offset(-9,32) A_GiveInventory("UsedStamina", 5)
		RIFG A 0 offset(9,33) A_SpawnItemEx("FootStep", 0, 0, 2, 0, 0, -4)
		RISP A 1 offset(9,34) A_SetPitch(pitch +0.5)
		RISP A 1 offset(6,36) A_SetPitch(pitch +0.5)
		RISP A 1 offset(3,38) A_SetPitch(pitch +0.5)
		RISP A 1 offset(0,38) A_SetPitch(pitch +0.5)
		RISP A 1 offset(-3,36) A_SetPitch(pitch +0.5)
		RISP A 1 offset(-6,34) A_SetPitch(pitch +0.5)
		RISP A 1 offset(-9,32) A_SetPitch(pitch +0.5)
		RIFG A 0 offset(-9,32) A_WeaponReady(WRF_NOBOB)
		RIFG A 0 offset(-9,32) A_JumpIfInventory("IsRunning", 1, "Sprinting")
		
		Goto StopSprint
	StopSprintTired:
		RIFG A 1
		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		RIFG A 0 A_PlaySound("Tired", 2)
		RIFG A 0 A_TakeInventory("UsedStamina", 2)
		RIFG A 5 A_WeaponReady
		RIFG A 0 A_TakeInventory("UsedStamina", 2)
		RIFG A 5 A_WeaponReady
		RIFG A 0 A_TakeInventory("UsedStamina", 2)
		RIFG A 5 A_WeaponReady
		RIFG A 0 A_TakeInventory("UsedStamina", 2)
		RIFG A 5 A_WeaponReady
		RIFG A 0 A_TakeInventory("UsedStamina", 2)
		RIFG A 5 A_WeaponReady
		Goto Ready3
	StopSprint:
		RISP A 1
		RIFG A 0 A_JumpIfInventory("UsedStamina", 60, "StopSprintTired")
		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		Goto Ready3
	
	
	SelectAnimation:
        TNT1 AA 1 A_JumpIfInventory("GoFatality", 1, "Steady")
		RIFG A 0 A_GunFlash
		RIFG A 0 A_JumpIfInventory("JustStartedGame",1,"WarmUp")
        RIFG A 0 A_PlaySound("CLIPIN")
		RIFG A 0 A_Takeinventory("BDWeaponACtion",1)

		RIFS ABC 1
		RIFG A 0 A_Takeinventory("StartDualWield",1)
        TNT1 AAAA 0
		Goto Ready3
	
	Ready:
	Ready3:
		RIFG A 0 A_JumpIfInventory("Zoomed",1,"Ready2")
		RIFG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RIFG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
	    RIFG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        RIFG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RIFG A 0 A_JumpIfInventory("Unloading",1,"Unload")
		RIFG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		RIFG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		RIFG A 0 A_JumpIfInventory("Unloading",1,"Unload")
		RIFG A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		RIFG A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		RIFG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RIFG A 0 A_JumpIfInventory("StartDualWield",1,"DualWield")
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		Loop
		
    Ready2:
		RIFG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
        RIFG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        RIFG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RIFG A 0 A_JumpIfInventory("Unloading",1,"Unload")
		RIFG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		RIFG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		RIFG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RIFG A 0 A_JumpIfInventory("Unloading",1,"Unload")
		RIFG A 0 A_JumpIfInventory("StartDualWield",1,"DualWield")
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire2")
		RI2G A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RIFG A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint2")
		RIFG A 0 A_TakeInventory("UsedStamina", 2)
		Loop
	
		
	Deselect:
		RIFG A 0
		RIFG A 0 A_Takeinventory("Zoomed",1)
		RIFG A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_TakeInventory("TossGrenade", 1)
		RIFG A 0 A_TakeInventory("Kicking",1)
        RIFG A 0 A_TakeInventory("Taunting",1)
        RIFG A 0 A_TakeInventory("Reloading",1)
		RIFG A 0 A_TakeInventory("Unloading",1)
		RIFG A 0 A_TakeInventory("Salute1", 1)
		RIFG A 0 A_TakeInventory("Salute2", 1)
		RIFG A 0 A_Takeinventory("RifleSelected",1)
        RIFG A 0 A_ZoomFactor(1.0)
		RIFS CBA 1
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1 A_Lower
		Wait
		
	Select:
		RIFG A 0
		RIFG A 0 A_Takeinventory("StartDualWield",1)
		RIFG A 0 A_Giveinventory("GoSpecial",1)
		RIFG A 0 A_Takeinventory("FistsSelected",1)
		RIFG A 0 A_Takeinventory("SawSelected",1)
		RIFG A 0 A_Takeinventory("ShotgunSelected",1)
		RIFG A 0 A_Takeinventory("SSGSelected",1)
		RIFG A 0 A_Takeinventory("MinigunSelected",1)
		RIFG A 0 A_Takeinventory("PlasmaGunSelected",1)
		RIFG A 0 A_Takeinventory("RocketLauncherSelected",1)
		RIFG A 0 A_Takeinventory("GrenadeLauncherSelected",1)
		RIFG A 0 A_Takeinventory("BFGSelected",1)
		RIFG A 0 A_Takeinventory("BFG10kSelected",1)
		RIFG A 0 A_Takeinventory("RailGunSelected",1)
		RIFG A 0 A_Takeinventory("SubMachineGunSelected",1)
		RIFG A 0 A_Takeinventory("RevenantLauncherSelected",1)
		RIFG A 0 A_Takeinventory("LostSoulSelected",1)
		RIFG A 0 A_Takeinventory("FlameCannonSelected",1)
		RIFG A 0 A_Takeinventory("HasBarrel",1)
		RIFG A 0 A_TakeInventory("TossGrenade", 1)
		RIFG A 0 A_TakeInventory("IsRunning", 1)
		RIFG A 0 A_Giveinventory("RifleSelected",1)
		
		TNT1 A 1 A_Raise
		TNT1 AAAAAAAAA 0 A_Raise
		Goto SelectAnimation
	
    Fire:
        RIFG A 0 A_JumpIfInventory("RifleAmmo",1,2)
        Goto NoAmmo
        TNT1 AA 0
		RIFG A 0 A_AlertMonsters
		RIFF A 0 A_FireCustomMissile("DistantFireSoundRifle", random(-1,1), 0, 0, -12, 0, random(-1,1))
		RIFG A 0 A_Takeinventory("DoubleRifleAmmo",1)
        RIFG A 0 A_PlaySound("weapons/rifle", 1)
		
		
		RIFG A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
		RIFF A 1 BRIGHT
		RIFG A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		RIFF B 1 BRIGHT A_FireBullets (1.5, 1.5, -1, 20, "HitPuff", FBF_NORANDOM)
        RIFF A 0 A_FireCustomMissile("DecorativeTracer", random(-1,1), 0, 0, -12, 0, random(-1,1))
		RIFG A 0 A_ZoomFactor(0.98)
		RIFG A 0 A_Takeinventory("RifleAmmo",1)
		RIFF C 1 A_FireCustomMissile("RifleCaseSpawn",5,0,6,-14)
		RIFG A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)//tactical mode has muzzle climb
		RIFG A 0 A_SetPitch(pitch-2.0)
		RIFG A 0
		RIFG A 0 A_ZoomFactor(1.0)
        RIFG A 1 A_JumpIfInventory("IsTacticalClass", 1, 1)//Tactical mode skips a frame, fires faster
		RIFG A 1
		RIFG A 0
		RIFG A 0 A_Refire
		RIFG A 2 A_WeaponReady(1)
		Goto Ready3
	
     Fire2:
		RIFG A 0
		//RIFF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 0, 0, 0)
		RIFG A 0 A_SpawnItemEx("PlayerMuzzle1",30,0,45)
		RIFG A 0 A_ZoomFactor(1.9)
		RI2F A 1 BRIGHT A_FireBullets (1, 1, 1, 20, "HitPuff", FBF_NORANDOM)
        RI2F A 0 BRIGHT A_FireCustomMissile("DecorativeTracer", 0, 0, 0, 0)
		RIFG A 0 A_Takeinventory("RifleAmmo",1)
		RIFG A 0 A_ZoomFactor(2.0)
		RI2F B 1 
		RIFG A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)
		RIFG A 0 A_SetPitch(pitch-1.0)
		RIFG A 0 A_FireCustomMissile("RifleCaseSpawn",1,0,8,0)
        RI2F C 1
		RIFG A 0
		RI2G A 1
		RIFG A 0 A_JumpIfInventory("IsTacticalClass", 1, 2)//Tactical mode skips a frame, fires faster
		RI2G A 1
		RIFG A 0
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RIFG A 0 A_JumpIfInventory("FiredSecondary",1,"HoldAim")//If still pressing alt fire, it means its holding aim
        RI2F B 0 A_ReFire
		RIFG A 0 A_JumpIfInventory("ZoomHold", 1, "NoAim")
		RI2G A 10 A_WeaponReady(1)
        RI2G A 0
		Goto Ready2
		
    AltFire:
        RIFG A 0
		RIFG A 0 A_Giveinventory("GoSpecial",1)
		RIFG A 0 A_JumpIfInventory("Zoomed",1,"NoAim")
		RIFG A 0 A_Giveinventory("Zoomed",1)
        RIFG A 0 A_ZoomFactor(2.0)
		RIFG A 0 A_Giveinventory("ADSmode",1)
        RIFZ ABC 1
		
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RI2G A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RI2G A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RI2G A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RI2G A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RI2G A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RI2G A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RI2G A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		
		
		RIFG A 0 A_JumpIfInventory("FiredSecondary",1,"HoldAim")
        Goto Ready2
		
	   HoldAim:	
		RIFG A 0 A_GiveInventory("ZoomHold",1)
	    RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RI2G A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RI2G A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RI2G A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RIFG A 0 A_JumpIfInventory("FiredSecondary",1,"HoldAim")
		
       NoAim:
		RIFG A 0
		RIFG A 0 A_Takeinventory("Zoomed",1)
		RIFG A 0 A_Takeinventory("ZoomHold",1)
        RIFG A 0 A_ZoomFactor(1.0)
		RIFG A 0 A_Takeinventory("ADSmode",1)
		RIFZ BA 1
        Goto Ready3
			
		
	NoAmmo:
		RIFG A 0
		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")
		RIFG A 5 A_WeaponReady(WRF_ALLOWRELOAD | WRF_NOFIRE)
		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("Clip2",1,"Reload")
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"NoAmmo2")
		Goto Ready3
	
    Reload:
		RIFG A 1 A_WeaponReady
		RIFG A 0 A_TakeInventory("RifleSpread", 10)
		RIFG A 0 A_JumpIfInventory("TurboReload",1,"TurboReload")
		RIFG A 0 A_ZoomFactor(1.0)
		RIFG A 0 A_Takeinventory("Reloading",1)
		RIFG A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_Takeinventory("Zoomed",1)
		RIFG A 0 A_JumpIfInventory("RifleAmmo",31,76)
		RIFG A 0 A_JumpIfInventory("TurboReload",1,"TurboReload")
        RIFG A 0 A_JumpIfInventory("Clip2",1,3)
        Goto FinishReloading
        TNT1 AAA 0
		RIFG A 0 A_Takeinventory("Zoomed",1)
        RIFG A 0 A_PlaySound("Reload", 6)
		RIFG A 0 A_GiveInventory ("Pumping", 1)
		RIFG A 0 A_Takeinventory("Reloading",1)
		RIFG A 0 A_JumpIfInventory("TurboReload",1,"TurboReload")
		RIFG A 0
        RIFR ABCDE 1  A_JumpIfInventory("Kicking",1,"DoKick")
		RIFG A 0 A_JumpIfInventory("HasUnloaded", 1, 2)
        RIFR F 1 A_FireCustomMissile("EmptyClipSpawn",-5,0,8,-4)
        RIFR GGGGGG 1
		RIFR HIKL 1
		RIFR MMMMM 1
		RIFR NOPQRST 1 A_JumpIfInventory("Kicking",1,"DoKick")
		RIFG A 0 A_Takeinventory("HasUnloaded",1)
		RIFG A 0 A_JumpIfInventory("RifleAmmo",1,"InsertBullets2")//30+1 effect
		Goto InsertBullets
		
	TurboReload:
		RIFG A 0 A_Takeinventory("HasUnloaded",1)
		RIFG A 0 A_JumpIfInventory("Clip2",1,3)
		Goto Ready3
		RIFS ABC 0
        Goto InsertBullets
		
	InsertBullets:
		TNT1 AAAA 0
		RIFG A 0 A_JumpIfInventory("RifleAmmo",30,15)
		RIFG A 0 A_JumpIfInventory("Clip2",1,3)
		Goto FinishReloading
        TNT1 AAAAAA 0
		RIFG A 0 A_Giveinventory("RifleAmmo",1)
		RIFG A 0 A_Giveinventory("DoubleRifleAmmo",1)
		RIFG A 0 A_Takeinventory("Clip2",1)
		Goto InsertBullets
		
		TNT1 AAAAAAAAAA 0
		RIFG A 0 A_Takeinventory("Reloading",1)
		
		RIFG A 0 A_Refire
        Goto FinishReloading
		TNT1 AAAA 0
		RIFG A 0 A_Takeinventory("Reloading",1)
		
		RIFG A 0 A_Refire
        Goto FinishReloading
		
	InsertBullets2:
		TNT1 AAAA 0
		RIFG A 0 A_JumpIfInventory("RifleAmmo",31,15)
		RIFG A 0 A_JumpIfInventory("Clip2",1,3)
		Goto FinishReloading
        TNT1 AAAAAA 0
		RIFG A 0 A_Giveinventory("RifleAmmo",1)
		RIFG A 0 A_Giveinventory("DoubleRifleAmmo",1)
		RIFG A 0 A_Takeinventory("Clip2",1)
		Goto InsertBullets2
		
		TNT1 AAAAAAAAAA 0
		RIFG A 0 A_Takeinventory("Reloading",1)
		RIFG A 0 A_Refire
        Goto FinishReloading
		TNT1 AAAA 0
		RIFG A 0 A_Takeinventory("Reloading",1)
		
		RIFG A 0 A_Refire
        Goto FinishReloading	
		
	FinishReloading:
		RIFG A 0
		RIFG A 0 A_Refire
		Goto Ready3
		
		
		
		
		
		
	Unload:
		RIFG A 1 A_WeaponReady
		RIFG A 0 A_ZoomFactor(1.0)
		RIFG A 0 A_Takeinventory("Unloading",1)
		RIFG A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_Takeinventory("Zoomed",1)
        RIFG A 0 A_JumpIfInventory("RifleAmmo",1,3)
        Goto NoAmmo
        TNT1 AAA 0
		RIFG A 0 A_Takeinventory("Zoomed",1)
		RIFR TSRQPO 1
        RIFG A 0 A_PlaySound("Reload")
		RIFG A 0 A_GiveInventory ("Pumping", 1)
		RIFG A 0 A_Takeinventory("Unloading",1)
		
	RemoveBullets:
		TNT1 AAAA 0
		RIFG A 0 A_JumpIfInventory("RifleAmmo",1,3)
		Goto FinishUnload
        TNT1 AAAAAA 0
		RIFG A 0 A_Takeinventory("RifleAmmo",1)
		RIFG A 0 A_Takeinventory("DoubleRifleAmmo",1)
		RIFG A 0 A_Giveinventory("Clip2",1)
		Goto RemoveBullets
	
	FInishUnload:
		RIFR NMLKIGHGFEDCBA 1
		RIFG A 0 A_PlaySound("DryFire")
		RIFG A 0 A_GiveInventory("HasUnloaded", 1)
		RIFG A 0 A_Takeinventory("Unloading",1)
		Goto Ready3
		
		
		
 	Spawn:
		RIFL A -1
		Stop
		
	DualWield:
		RIFG A 1
		RIFG A 0 A_Takeinventory("StartDualWield",1)
		RIFG A 0 A_JumpIfInventory("IsTacticalClass", 1, "NoDual")//Tactical mode cant dual
		RIFG A 0 A_JumpIfInventory("DualRifles", 1, "GetDual")
		RIFG A 0 A_Print("You must have two identical weapons to dual wield.")
		Goto Ready
	
	NoDual:
		RIFG A 1
		RIFG A 0 A_Print("You can't dual wield rifles when playing in Tactical Mode. Real operators never try to look cool in a firefight.")
		Goto Ready
		
	 GetDual:	
		RIFG A 0 A_Takeinventory("Zoomed",1)
		RIFG A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_TakeInventory("TossGrenade", 1)
		RIFG A 0 A_TakeInventory("Kicking",1)
        RIFG A 0 A_TakeInventory("Taunting",1)
        RIFG A 0 A_TakeInventory("Reloading",1)
		RIFG A 0 A_TakeInventory("Unloading",1)
		RIFG A 0 A_TakeInventory("Salute1", 1)
		RIFG A 0 A_TakeInventory("Salute2", 1)
        RIFG A 0 A_ZoomFactor(1.0)
		RIFG A 0 A_SelectWEapon("DualRifles")
		Goto Ready
		
		
		
	Execution2:
		RIFG A 0
		RIFG A 0 A_ZoomFactor(1.1)
		RIBB A 1 A_Stop
        RIBB B 1 A_PlaySound("skeleton/swing")
		RIBB C 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
		RIBB D 6 A_Stop
		RIBB CBA 2 A_Stop
		
		RIBB A 1 A_Stop
        RIBB B 1 A_PlaySound("skeleton/swing")
		RIBB C 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
		RIBB D 6 A_Stop
		RIBB CBA 2 A_Stop
		
		
		RIBB A 1 A_Stop
        RIBB B 1 A_PlaySound("skeleton/swing")
		RIBB C 1 A_FireCustomMissile("ExecutionAttackKick", 0, 0, 0, 0)
		RIBB D 6 A_Stop
		RIBB CBA 2 A_Stop
		
		TNT1 A 5
		Goto FinishExecution	
	}
}

Actor Zoomed : Inventory
{
inventory.maxamount 1
}

//Actor RifleAmmo : Inventory
//{
//inventory.maxamount 30
//}

ACTOR RifleAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 31
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 31
   Inventory.Icon "RIFLA0"
}

ACTOR MeatshieldGunAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 30
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 30
}

ACTOR MeatAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 100
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 100
}