ACTOR DMR : Rifle 18001
{
	Weapon.AmmoUse1 0
	Weapon.AmmoGive1 10
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 0
	weapon.slotnumber 2
	YScale 0.6
	XScale 0.8
	Tag "Sniper Rifle/DMR"
	Weapon.SelectionOrder 4500
	Weapon.AmmoType1 "DMRClip"
	Weapon.AmmoType2 "DMRAmmo"
	Obituary "%o was scoped by %k's DMR."
    AttackSound "None"
    Inventory.PickupSound "CLIPIN"
	Inventory.Pickupmessage "You got the DMR!"
	+WEAPON.WIMPY_WEAPON
    +WEAPON.NOAUTOAIM
    +WEAPON.NOALERT
	+WEAPON.NO_AUTO_SWITCH
    +WEAPON.NOAUTOFIRE
	+noautofire
	+FORCEXYBILLBOARD
    Scale 0.8
	States
	{
	PickUp:
	TNT1 A 0 A_Playsound("DMR/Select")
	TNT1 A 0
	Stop
	meatshield:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		PUNG BCD 1
        TNT1 A 0 A_PlaySound("skeleton/swing")
		PUNG A 0 A_FireCustomMissile("MeleeStrikegrab", 0, 0, 0, -9)
		PUNG E 1
		PUNG DCB 1
        PUNG AA 1
		TNT1 A 0 A_Refire("meatshield")
		tnt1 a 0 A_weaponready
		TNT1 A 0 A_TakeInventory("Salute1",1)
		TNT1 A 0 A_TakeInventory("Salute2",1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Ready+1
	Steady:
	TNT1 A 1
	Goto Ready+1
	
	WarmUp:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("JustStartedGame", 1)
		TNT1 A 0 A_WeaponReady
		PUNS ABCD 0 A_WeaponReady
		TNT1 A 0 A_PlaySound("Knuckled")
		PUNS E 0 A_WeaponReady
		PUNS FGFE 0 A_WeaponReady
		PUNS DCB 1 A_WeaponReady
		TNT1 A 0 A_WeaponReady
		R2RL ABCDE 0 A_WeaponReady
        R2RL EEEEEEE 0 A_WeaponReady
		DMRR HIKL 0 A_WeaponReady
		TNT1 A 0 A_PlaySound("DryFire")
		DMRR MMM 0 A_WeaponReady
		DMRR NOPQRST 0 A_WeaponReady
		goto Ready+15
	
	lowhealth:
		tnt1 a 0 A_jumpifhealthlower(30,2)
		tnt1 a 4
		loop
		tnt1 a 0
		blsc a 4
		loop
	Ready:
		tnt1 a 0 //A_gunflash("lowhealth")
		tnt1 a 0
	TNT1 A 0 A_selectweapon("Impshield")
		TNT1 A 0 A_selectweapon("ZMANshield")
		TNT1 A 0 A_selectweapon("SGUYshield")
        TNT1 A 2 A_JumpIfInventory("GoFatality", 1, "Steady")
		
		TNT1 A 0 A_JumpIfInventory("JustStartedGame",1,"WarmUp")
        TNT1 A 0 A_PlaySound("DMR/Select")
        DMRS ABCDEFG 1
        TNT1 AAAAAAAA 0
        TNT1 A 0 //A_JumpIfInventory("DMRAmmo",1,2)
        //Goto Reload
        TNT1 AAAA 0

        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_TakeInventory("RifleSpread", 5)
		DMRG A 1 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("JustStartedGame",1,"WarmUp")
		TNT1 A 0 A_TakeInventory("UsedStamina", 1)
		
        goto Ready+15
    Ready2:
		Tnt1 a 0 A_jumpifinventory("Walking",1,"Ready2Walk")
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		
		DM2G A 2 A_WeaponReady(wrf_nobob)
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		Loop
	Ready2Walk:
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		DM2G ABCDEEEDCBAFGHIIIHGF 1 A_WeaponReady(wrf_nobob)
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		goto ready2
	Deselect:
		TNT1 A 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
        TNT1 A 0 A_ZoomFactor(1.0)
		DMRS GFEDCBA 1
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1
		Wait
		
	Select:
		TNT1 A 0 A_Takeinventory("FistsSelected",1)
		TNT1 A 0 A_Takeinventory("SawSelected",1)
		TNT1 A 0 A_Takeinventory("ShotgunSelected",1)
		TNT1 A 0 A_Takeinventory("SSGSelected",1)
		TNT1 A 0 A_Takeinventory("MinigunSelected",1)
		TNT1 A 0 A_Takeinventory("PlasmaGunSelected",1)
		TNT1 A 0 A_Takeinventory("RocketLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("GrenadeLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("BFGSelected",1)
		TNT1 A 0 A_Takeinventory("BFG10kSelected",1)
		TNT1 A 0 A_Takeinventory("RailGunSelected",1)
		TNT1 A 0 A_Takeinventory("SubMachineGunSelected",1)
		TNT1 A 0 A_Takeinventory("RevenantLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("LostSoulSelected",1)
		TNT1 A 0 A_Takeinventory("FlameCannonSelected",1)
		TNT1 A 0 A_Takeinventory("HasBarrel",1)
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		MARN A 0 ACS_ExecuteAlways(728, 0, 0, 0, 0)//Check if penetration is on.
		TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
		
		Goto Ready+1
	
    Fire:
		tnt1 aaaaa 0 A_custommissile("Alerter",0,0,random(-5,5),0,random(-5,5))
        TNT1 A 0 A_JumpIfInventory("DMRAmmo",1,2)
        Goto Reload
        TNT1 AAAA 0
		Tnt1 a 0 A_jumpifinventory("Walking",1,"FireWalk")
		//TNT1 A 0 A_JumpIfInventory("RifleSpread", 5, "FireHighSpread")
		TNT1 A 0 A_Takeinventory("DoubleDMRAmmo",1)
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
		tnt1 a 0 A_recoil(0.5)
        TNT1 A 0 A_PlaySound("DMR/fire")
		DMRF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 0, 0, 0)
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		DMRF A 1 BRIGHT A_AlertMonsters
		TNT1 A 0 A_SetPitch(+0.5 + pitch)
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		DMRF B 1 BRIGHT A_FireBullets (5, 5, 1, random(20,30), "shotPuff")
		TNT1 A 0 A_SetPitch(+2.5 + pitch)
        DMRF A 0 A_FireCustomMissile("Tracer", random(-5,5), 0, 0, -12, 0, random(-5,5))
		TNT1 A 0 A_JumpIfInventory("NoPenetration", 1, 2)
		DMRF A 0 A_FireCustomMissile("WallPenetrationHitscan", 0, 0, -1, 0, 0, 0)
		TNT1 A 0
		//TNT1 A 0 ACS_Execute(373, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_Takeinventory("DMRAmmo",1)
		TNT1 A 0 A_SetPitch(-9.2 + pitch)
		DMRF C 1 A_FireCustomMissile("RifleCaseSpawn",5,0,6,-14)
        DMRG A 0
		TNT1 A 0 A_SpawnItem("DistantRifleFireSound")
		DMRF D 1 A_SetPitch(+0.2 + pitch)
		DMRF E 1 A_SetPitch(+0.4 + pitch)
		DMRF F 1 A_SetPitch(+0.4 + pitch)
		DMRF G 1 A_SetPitch(+0.6 + pitch)
		DMRF H 1 A_SetPitch(+0.8 + pitch)
		DMRG A 1 A_SetPitch(+1.0 + pitch)
		DMRG A 1 A_SetPitch(+1.0 + pitch)
		DMRG A 2
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		DMRG A 0 a_refire
		DMRG A 5 A_WeaponReady(1)
		goto Ready+15
	FireWalk:
		//TNT1 A 0 A_JumpIfInventory("RifleSpread", 5, "FireHighSpread")
		TNT1 A 0 A_Takeinventory("DoubleDMRAmmo",1)
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Fire2Walk")
		tnt1 a 0 A_recoil(0.5)
        TNT1 A 0 A_PlaySound("DMR/fire")
		DMRF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 0, 0, 0)
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		DMRF A 1 BRIGHT A_AlertMonsters
		TNT1 A 0 A_SetPitch(+0.5 + pitch)
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		DMRF B 1 BRIGHT A_FireBullets (10, 10, 1, random(20,30), "shotPuff")
		TNT1 A 0 A_SetPitch(+2.5 + pitch)
        DMRF A 0 A_FireCustomMissile("Tracer", random(-10,10), 0, 0, -12, 0, random(-10,10))
		TNT1 A 0 A_JumpIfInventory("NoPenetration", 1, 2)
		DMRF A 0 A_FireCustomMissile("WallPenetrationHitscan", 0, 0, -1, 0, 0, 0)
		TNT1 A 0
		//TNT1 A 0 ACS_Execute(373, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_Takeinventory("DMRAmmo",1)
		TNT1 A 0 A_SetPitch(-9.2 + pitch)
		DMRF C 1 A_FireCustomMissile("RifleCaseSpawn",5,0,6,-14)
        DMRG A 0
		TNT1 A 0 A_SpawnItem("DistantRifleFireSound")
		DMRF D 1 A_SetPitch(+0.2 + pitch)
		DMRF E 1 A_SetPitch(+0.4 + pitch)
		DMRF F 1 A_SetPitch(+0.4 + pitch)
		DMRF G 1 A_SetPitch(+0.6 + pitch)
		DMRF H 1 A_SetPitch(+0.8 + pitch)
		DMRG A 1 A_SetPitch(+1.0 + pitch)
		DMRG A 1 A_SetPitch(+1.0 + pitch)
		DMRG A 2
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		DMRG A 0 a_refire
		DMRG A 5 A_WeaponReady(1)
		goto Ready+15
	
      Fire2:
	  tnt1 a 0 A_recoil(0.5)
	  TNT1 A 0 A_PlaySound("DMR/fire")
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		DM2G A 0 A_AlertMonsters
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,5)
		DMRF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 4, 0, 0)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,0,45)
		DM2F A 1 BRIGHT A_FireBullets (0.5, 0.5, 1, random(30,40), "shotPuff")
		//tnt1 a 0 A_FireCustomMissile("Tracer", random(-1,1), 0, 0, -12, 0, random(-1,1))
      //  DM2F A 0 BRIGHT A_FireCustomMissile("Tracer", 0, 0, -0, 0)
        //TNT1 A 0 ACS_Execute(373, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		TNT1 A 0 A_SetPitch(+1.5 + pitch)
		TNT1 A 0 A_Takeinventory("DMRAmmo",1)
		DM2F B 1
		TNT1 A 0 A_SetPitch(-5.8 + pitch)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",1,0,8,0)
        DM2F C 1
		DM2G A 1 A_SetPitch(+0.2 + pitch)
		DM2G A 1 A_SetPitch(+0.2 + pitch)
		DM2G A 1 A_SetPitch(+0.2 + pitch)
		DM2G A 1 A_SetPitch(+0.4 + pitch)
		DM2G A 1 A_SetPitch(+0.6 + pitch)
		DM2G A 1 A_SetPitch(+0.4 + pitch)
		DM2G A 1 A_SetPitch(+0.6 + pitch)
		DM2G A 1 A_SetPitch(+0.8 + pitch)
		DM2G A 1 A_SetPitch(+0.8 + pitch)
		DM2G A 1 A_WeaponReady(1)
		TNT1 A 0
        DM2F B 0 A_refire
		TNT1 A 0 A_TakeInventory("IsFiringAltFireOnFullAuto", 1)
		DM2G A 10 A_WeaponReady(1)
        DM2G A 0
		Goto Ready2
		
	Fire2Walk:
	  tnt1 a 0 A_recoil(0.5)
	  TNT1 A 0 A_PlaySound("DMR/fire")
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		DM2G A 0 A_AlertMonsters
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,5)
		DMRF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 4, 0, 0)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,0,45)
		DM2F A 1 BRIGHT A_FireBullets (2, 2, 1, random(30,40), "shotPuff")
		//tnt1 a 0 A_FireCustomMissile("Tracer", random(-2,2), 0, 0, -12, 0, random(-2,2))
      //  DM2F A 0 BRIGHT A_FireCustomMissile("Tracer", 0, 0, -0, 0)
        //TNT1 A 0 ACS_Execute(373, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		TNT1 A 0 A_SetPitch(+1.5 + pitch)
		TNT1 A 0 A_Takeinventory("DMRAmmo",1)
		DM2F B 1
		TNT1 A 0 A_SetPitch(-5.8 + pitch)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",1,0,8,0)
        DM2F C 1
		DM2G A 1 A_SetPitch(+0.2 + pitch)
		DM2G A 1 A_SetPitch(+0.2 + pitch)
		DM2G A 1 A_SetPitch(+0.2 + pitch)
		DM2G A 1 A_SetPitch(+0.4 + pitch)
		DM2G A 1 A_SetPitch(+0.6 + pitch)
		DM2G A 1 A_SetPitch(+0.4 + pitch)
		DM2G A 1 A_SetPitch(+0.6 + pitch)
		DM2G A 1 A_SetPitch(+0.8 + pitch)
		DM2G A 1 A_SetPitch(+0.8 + pitch)
		DM2G A 1 A_WeaponReady(1)
		TNT1 A 0
        DM2F B 0 A_refire
		TNT1 A 0 A_TakeInventory("IsFiringAltFireOnFullAuto", 1)
		DM2G A 10 A_WeaponReady(1)
        DM2G A 0
		Goto Ready2
	  //TNT1 A 0 A_JumpIfInventory("IsFiringAltFireOnFullAuto", 1, "Fire2FullAuto")
        //TNT1 A 0 A_PlaySound("weapons/rifle")
       //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		//DM2G A 0 A_AlertMonsters
		//DMRF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 4, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,5)
		//TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,0,45)
		//DM2F A 1 BRIGHT A_FireBullets (0.5, 0.5, -1, 9, "HitPuff")
        //DM2F A 0 BRIGHT A_FireCustomMissile("Tracer", 0, 0, -1, 0)
		//TNT1 A 0 A_JumpIfInventory("NoPenetration", 1, 2)
		//DMRF A 0 A_FireCustomMissile("WallPenetrationHitscan", 0, 0, -1, -12, 0, 0)
		//TNT1 A 0
       //TNT1 A 0 ACS_Execute(373, 0, 0, 0, 0)
	//TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		//TNT1 A 0 A_SetPitch(+2.0 + pitch)
		//TNT1 A 0 A_Takeinventory("DMRAmmo",1)
		//TNT1 A 0 A_SpawnItem("DistantRifleFireSound")
		//DM2F B 1 A_WeaponReady(1)
		//TNT1 A 0 A_SetPitch(-1.1 + pitch)
		//TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",1,0,8,0)
        //DM2F C 1 A_WeaponReady(1)
		//TNT1 A 0 A_SetPitch(-1.1 + pitch)
		//TNT1 A 0 A_GiveInventory("IsFiringAltFireOnFullAuto", 1)
		//DM2G A 0 A_WeaponReady(1)
        //DM2F B 0 A_ReFire
		//TNT1 A 0 A_TakeInventory("IsFiringAltFireOnFullAuto", 1)
		//DM2G A 10 A_WeaponReady(1)
        //DM2G A 0
		Goto Ready2
		
	Fire2FullAuto:
        TNT1 A 0 A_PlaySound("DMR/fire")
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		DM2G A 0 A_AlertMonsters
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,5)
		DMRF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 4, 0, 0)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,0,45)
		DM2F A 1 BRIGHT A_FireBullets (0.05, 0.05, -1, 50, "HitPuff")
        DM2F A 0 BRIGHT A_FireCustomMissile("Tracer", 0, 0, -1, 0)
        //TNT1 A 0 ACS_Execute(373, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		TNT1 A 0 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_Takeinventory("DMRAmmo",1)
		DM2F B 1
		TNT1 A 0 A_SetPitch(-0.9 + pitch)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",1,0,8,0)
        DM2F C 1
		TNT1 A 0 A_SetPitch(+0.3 + pitch)
		DM2G A 5 A_WeaponReady(1)
		TNT1 A 0
        DM2F B 0 A_refire
		TNT1 A 0 A_TakeInventory("IsFiringAltFireOnFullAuto", 1)
		DM2G A 10 A_WeaponReady(1)
        DM2G A 0
		Goto Ready2	

    AltFire:
		tnt1 a 0
        TNT1 A 0 A_setcrosshair(7)
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"NoAim")
		TNT1 A 0 A_Giveinventory("Zoomed",1)
		TNT1 A 0 A_Giveinventory("GoSpecial",1)
        TNT1 A 0 A_ZoomFactor(4.0)
		TNT1 A 0 A_Giveinventory("ADSmode",1)
        DMRZ ABCDEF 1
        Goto Ready2
       NoAim:
	   TNT1 A 0 A_setcrosshair(0)
        DMRZ FEDCBA 1
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
        goto Ready+15
		
	NoAmmo:
	DMRG A 1 A_PlaySound("weapons/empty")
	TNT1 A 0 A_Takeinventory("Zoomed",1)
    TNT1 A 0 A_ZoomFactor(1.0)
	TNT1 A 0 A_Takeinventory("ADSmode",1)
	goto Ready+15
	
    Reload:
	TNT1 A 0 A_SetCrosshair(0)
		DMRG A 1 A_WeaponReady
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_JumpIfInventory("DMRAmmo",11,64)
        TNT1 A 0 A_JumpIfInventory("DMRClip",1,3)
        Goto NoAmmo
        TNT1 AAA 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_PlaySound("DMR/Reload")
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0
        DMRR ABCDE 1  A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("HasUnloaded", 1, 2)
        DMRR F 1 A_FireCustomMissile("EmptyDMRClipSpawn",-5,0,8,-4)
        DMRR GGGG 3 A_JumpIfInventory("Kicking",1,"DoKick")
		DMRR HIK 1 A_JumpIfInventory("Kicking",1,"DoKick")
		DMRR L 1
		DMRR MMM 1
		DMRR NOPQRST 1
		TNT1 A 0 A_Takeinventory("HasUnloaded",1)
		TNT1 A 0 A_JumpIfInventory("DMRAmmo",1,"InsertBullets2")//30+1 effect
		
	InsertBullets:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("DMRAmmo",10,15)
		TNT1 A 0 A_JumpIfInventory("DMRClip",1,3)
		goto Ready+15
        TNT1 AAAAAA 0
		TNT1 A 0 A_Giveinventory("DMRAmmo",1)
		TNT1 A 0 A_Giveinventory("DoubleDMRAmmo",1)
		TNT1 A 0 A_Takeinventory("DMRClip",1)
		Goto InsertBullets
		
		TNT1 AAAAAAAAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
		tnt1 a 0 A_playsound("DMR/racking",51)
		tnt1 a 0 A_playsound("DMR/racking",52)
		tnt1 a 0 A_playsound("DMR/racking",53)
		tnt1 a 0 A_playsound("DMR/racking",54)
		tnt1 a 0 A_playsound("DMR/racking",55)
		tnt1 a 0 A_playsound("DMR/racking",56)
		DMRC ABCDEFGHIJJJJ 1
		tnt1 a 0 A_playsound("DMR/racking2",61)
		tnt1 a 0 A_playsound("DMR/racking2",62)
		tnt1 a 0 A_playsound("DMR/racking2",63)
		tnt1 a 0 A_playsound("DMR/racking2",64)
		tnt1 a 0 A_playsound("DMR/racking2",65)
		tnt1 a 0 A_playsound("DMR/racking2",66)
		DMRC JIHGFEDCBA 1
		
		TNT1 A 0 A_Refire
        goto Ready+15
		TNT1 AAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
		
		TNT1 A 0 A_Refire
        goto Ready+15
		
	InsertBullets2:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("DMRAmmo",11,15)
		TNT1 A 0 A_JumpIfInventory("DMRClip",1,3)
		goto Ready+15
        TNT1 AAAAAA 0
		TNT1 A 0 A_Giveinventory("DMRAmmo",1)
		TNT1 A 0 A_Giveinventory("DoubleDMRAmmo",1)
		TNT1 A 0 A_Takeinventory("DMRClip",1)
		Goto InsertBullets2
		
		TNT1 AAAAAAAAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_Refire
        goto Ready+15
		TNT1 AAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
		
		TNT1 A 0 A_Refire
        goto Ready+15	
		
		
		
		
		
		
		
		
	Unload:
		DMRG A 1 A_WeaponReady
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_JumpIfInventory("DMRAmmo",1,3)
        Goto NoAmmo
        TNT1 AAA 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		DMRR TSRQPO 1
        TNT1 A 0 A_PlaySound("Reload")
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		
	RemoveBullets:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("DMRAmmo",1,3)
		Goto FinishUnload
        TNT1 AAAAAA 0
		TNT1 A 0 A_Takeinventory("DMRAmmo",1)
		TNT1 A 0 A_Takeinventory("DoubleDMRAmmo",1)
		TNT1 A 0 A_Giveinventory("DMRClip",1)
		Goto RemoveBullets
	
	FInishUnload:
		DMRR NMLKIGHGFEDCBA 1
		TNT1 A 0 A_PlaySound("DryFire")
		TNT1 A 0 A_GiveInventory("HasUnloaded", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		goto Ready+15
		
		
		
 	Spawn:
		DMRL A -1
		Stop
		
		
	DoKick:
	    TNT1 A 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		NULL A 0 A_JumpIf (pitch > 32, "LowKickChecker1")
		Goto InitializeNormalKick
		
		LowKickChecker1:
		TNT1 A 0
	    NULL A 0 A_JumpIf (pitch > 90, "InitializeNormalKick")
		DMRF A 0 A_FireCustomMissile("KickAttackDetectDowned", 0, 0, 0, 0)
		
		InitializeNOrmalKick:
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		DMKI ABCD 1
		DMRF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        DMKI H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		DMKI I 1
		DMKI GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		goto Ready+15
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		DMKI ABCD 1
        DMRF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        DMKI H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		DMKI I 1
		DMKI GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		goto Ready+15
	Airflash:
		DMRR ABCDDDDDDDDDCCBBAA 1
		stop
	AirKick:
	tnt1 a 0 A_gunflash("AirFlash")
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		KICK JKLMN 1
        DMRF A 0 A_FireCustomMissile("AirKickAttack", 0, 0, 0, -31)
        KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		goto Ready+15
		
	SuperAirKick:
	tnt1 a 0 A_gunflash("AirFlash")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		KICK JKLMN 1
        DMRF A 0 A_FireCustomMissile("SuperAirKickAttack", 0, 0, 0, -31)
        KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		goto Ready+15
	
	Taunt:
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Taunting",1)
		TNT1 A 0 A_JumpIfInventory("RealismMode", 1, "CheckGrab")
        TNT1 A 10
		FUCK A 1
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 0, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", -9, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 9, 0, -1, 0)
        FUCK B 1 A_PlaySound("FUCK", 2)
        FUCK CD 1 A_AlertMonsters
		FUCK E 15 A_Takeinventory("Taunting",1)
        FUCK DCBA 1
        TNT1 A 10
		Goto Ready+1
	Salute:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		SALU ABCDEDCDEDCDEDCBA 4
		TNT1 A 0 A_TakeInventory("Salute1",1)
		TNT1 A 0 A_TakeInventory("Salute2",1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Ready+1
		
	CheckGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfTargetInLOS("CheckDistanceGrab")
		goto Ready+15
	CheckDistanceGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfCloser(100, "Grab")
		goto Ready+15
	CheckIfCanGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfInTargetInventory("CanGrab", 1, "Grab")
		goto Ready+15	
	Grab:
	    PKUP ABC 2
		TNT1 A 0 A_CustomMissile("PickupProjectile")
		PKUP DEF 2
		Goto Ready+1
	TossGrenade:	
		TNT1 A 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 0 A_JumpIfInventory("GrenadeAmmo", 1, 1)
		Goto NoGrenade
		GRTH ABCD 1
		TNT1 A 0 A_GiveInventory("FiredGrenade", 1)
		TNT1 A 0 A_PLaySound ("GRNPIN")
		GRTH EEFG 1
		TNT1 A 0 A_PLaySound ("GRNTOSS")
		GRTH HI 1
		TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1)
		TNT1 A 0 A_FireCustomMissile("HandGrenade", random(-2,2), 0, 0, 0, 0, 0)
	    TNT1 A 0 A_TakeInventory("FiredGrenade", 1)
		GRTH JKLM 1
		TNT1 A 1 
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		Goto Ready+1	
	NoGrenade:
		TNT1 A 0
		TNT1 A 0 A_Print("No Grenades Left.")
		goto Ready+15
	}
}
ACTOR DMRAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 11
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 11
   Inventory.Icon "0"
}