//==============================================================================
// Luftwaffe DP-65 (Maybe inspired by the M30 Luftwaffe Drilling Weapon)
//==============================================================================

ACTOR SGZoomed : Inventory { Inventory.MaxAmount 1 }

ACTOR HDShotgun : KriegslandLightWeapon
{
	+WEAPON.NOAUTOFIRE
	+INVENTORY.UNDROPPABLE
	Weapon.SelectionOrder 1000
	Weapon.AmmoUse 1
	Weapon.SlotNumber 3
	Weapon.AmmoGive 4
	Weapon.AmmoType "BOSH1"
	Inventory.Pickupmessage "You got the Luftwaffe DP-65!"
	Inventory.PickupSound 	"weapons/generic/pickup1"
	Obituary "%o's skull has been blown by %k's DP-65."
	Tag "Luftwaffe DP-65"
	States
	{
	Deselect:
		WP3G A 1 Offset(2, 34)
		WP3G A 1 Offset(7, 39)
		WP3G A 1 Offset(10, 47)
		WP3G A 1 Offset(22, 58)
		WP3G A 1 Offset(32, 69)
		WP3G A 1 Offset(54, 81)
		WP3G A 1 Offset(67, 100)
		WP3G A 1 A_Lower
		Wait 
	Ready:
		TNT1 A 0 A_JumpIfInventory("SGZoomed",1,"ReadyZoomed")
		WP3G A 1 A_WeaponReady(WRF_ALLOWZOOM)
		TNT1 A 0 A_JumpifInventory("IsBombing",1,"ThrowGrenade")
		NULL A 0 A_JumpIfInventory("SlidePlayer",1,"IsSliding")
		TNT1 A 0 A_JumpIfInventory("IsCrossing",1,"Cross")
		TNT1 A 0 A_JumpIfInventory("IsKnifing",1,"Knife")
		TNT1 A 0 A_JumpifInventory("IsKicking",1,"Kick")
		NULL A 0 A_TakeInventory("IAmUnzooming",1)
		Loop
	ReadyZoomed:
		NULL A 0 A_PlaySound("FKPlayer/breath",6,0.7,1)
		WP3Z A 1 A_WeaponReady(WRF_ALLOWZOOM|WRF_NOSECONDARY)
		NULL A 0 A_SetAngle(angle-frandom(-0.12,0.12))
		NULL A 0 A_SetPitch(pitch-frandom(-0.12,0.12))
		WP3Z A 1 A_WeaponReady(WRF_ALLOWZOOM|WRF_NOSECONDARY)
		NULL A 0 A_SetAngle(angle+frandom(-0.12,0.12))
		NULL A 0 A_SetPitch(pitch-frandom(-0.12,0.12))
		NULL A 0 A_JumpifInventory("IsKicking",1,"Kick")
		NULL A 0 A_JumpIfInventory("IsKnifing",1,"Knife")
		NULL A 0 A_JumpIfInventory("SlidePlayer",1,"IsSliding")
		NULL A 0 A_JumpifInventory("IsBombing",1,"ThrowGrenade")
		TNT1 A 0 A_TakeInventory("IAmZooming",1)
		Goto Ready
	Select:
		TNT1 A 0 A_Playsound("weapons/generic/select7",7)
		WP3G A 1 Offset(67, 100)
		WP3G A 1 Offset(54, 81)
		WP3G A 1 Offset(32, 69)
		WP3G A 1 Offset(22, 58)
		WP3G A 1 Offset(10, 47)
		WP3G A 1 Offset(7, 39)
		WP3G A 1 Offset(2, 34)
		WP3G A 1 A_Raise
		Wait
	Fire:	
		TNT1 A 0 A_JumpIfInventory("BOSH1",1,1)
		Goto Dryfire
		TNT1 A 0 A_JumpIfInventory("SGZoomed",1,"FireZoomed")
		TNT1 A 0 A_Playsound("weapons/SGN/fire",7)
		TNT1 A 0 A_FireBullets(3.6, 3.6, 7, 5,"Bullet_Puff")
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_Gunflash
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,10,0,0,0)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3F A 1 BRIGHT
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3F B 1 Offset(5,38)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3F B 1 Offset(3,36)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3F C 1 Offset(1,35)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3F C 1 Offset(0,33)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RecoilToggle")==0,2)
		TNT1 A 0 A_SetPitch(pitch -0.3)
		WP3G B 3 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_Playsound("weapons/SGN/pump1",6)
		WP3G B 1 Offset(2,35)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G B 1 Offset(5,37)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G C 1 Offset(8,39)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G C 1 Offset(12,41)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G D 1 Offset(14,44)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G D 3 Offset(16,46)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_FireCustomMissile("FKShellCasingSpawn",345+random(-8,8),0,2,-5,0)
		WP3G D 1 Offset(12,43)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G C 1 Offset(9,40)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G C 1 Offset(6,38)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G B 1 Offset(3,36)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G B 1 Offset(0,33)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		Goto Ready
	FireZoomed:
		TNT1 A 0 A_JumpIfInventory("BOSH1",1,1)
		Goto Dryfire
		NULL A 0 A_Playsound("weapons/SGN/fire",7)
		NULL A 0 A_FireBullets(3.6, 3.6, 7, 5,"Bullet_Puff")
		NULL A 0 A_AlertMonsters
		NULL A 0 A_Gunflash
		NULL A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,10,0,0,0)
		NULL A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3Z B 1 BRIGHT
		NULL A 0 A_ZoomFactor(1.18)
		NULL A 0 A_JumpIf(ACS_NamedExecuteWithResult("RecoilToggle")==0,2)
		NULL A 0 A_SetPitch(pitch -0.3)
		WP3Z C 1 Offset(0,35)
		NULL A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3Z C 1 Offset(0,34)
		NULL A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3Z C 1 Offset(0,33)
		NULL A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3Z C 1 Offset(0,32)
		NULL A 0 A_ZoomFactor(1.2)
		NULL A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3Z C 3 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		NULL A 0 A_Playsound("weapons/SGN/pump1",6)
		WP3Z D 2 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3Z E 2 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3Z F 2 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_FireCustomMissile("FKShellCasingSpawn",345+random(-8,8),0,2,-5,0)
		WP3Z D 2 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3Z C 3 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		Goto Ready
	Dryfire:
		TNT1 A 0 A_Print("No ammo",1)
		Goto Ready
	Altfire:
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G A 2 A_JumpIfInventory("HDShotgunX2",1,"SelectAkimbo")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		Goto Ready
	Zoom:
		TNT1 A 0 A_JumpIfInventory("IAmUnzooming",1,"Ready")
		NULL A 0 A_JumpIfInventory("IAmZooming",1,"ReadyZoomed")
		NULL A 0 A_JumpIfInventory("SGZoomed",1,"UnZoom")
		NULL A 0 A_GiveInventory("SGZoomed",1)
		WP3G E 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		NULL A 0 A_PlaySound("weapons/generic/select")
		WP3G F 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		NULL A 0 A_ZoomFactor(1.1)
		WP3Z G 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G H 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		NULL A 0 A_ZoomFactor(1.2)
		NULL A 0 A_GiveInventory("IAmZooming",3)
		Goto Ready
	UnZoom:
		NULL A 0 A_StopSound(6)
		WP3Z H 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3Z G 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		NULL A 0 A_ZoomFactor(1.1)
		WP3G F 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G E 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		NULL A 0 A_ZoomFactor(1.0)
		NULL A 0 A_PlaySound("weapons/generic/select")
		NULL A 0 A_TakeInventory("SGZoomed",1)
		NULL A 0 A_GiveInventory("IAmUnzooming",6)
		Goto Ready
	SelectAkimbo:
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3G A 2 A_SelectWeapon("HDShotgunX2")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		Goto Ready
	Cross:
		WP3G A 1
		TNT1 A 0 A_JumpIfInventory("HDSuperShotgun",1,"SelectCross")
		Goto Ready
	SelectCross:
		NULL A 0 A_GiveInventory("HDCrossAkimbo2",1)
		WP3G A 1 A_SelectWeapon("HDCrossAkimbo2")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		Goto Ready
	Kick:
		WP3G EF 1
		TNT1 A 1
		KICF A 1 Offset(-10,32)
		KICF CE 1
		KICF FG 1 A_Recoil(-1)
		TNT1 A 0 A_Jump(128,2)
		TNT1 A 0 A_PlaySound("FKPlayer/Grunt")
		KICF H 5 A_CustomPunch(6,0,0,"FightPuff") 
		KICF IGFEDC 1 
		KICF BA 1 A_Recoil(+0.5)
		TNT1 A 1
		WP3G FE 1 Offset(0,32)
		Goto Ready
	IsSliding:
		TNT1 A 0 A_TakeInventory("SlidePlayer",1)
		TNT1 A 0 A_JumpIfInventory("CrouchPlayer",1,"Ready")
		WP3G EF 1
		TNT1 A 0 A_PlaySound("FKPlayer/slide/start",4)
		TNT1 A 0 A_PlaySound("FKPlayer/slide/loop",5,0.5,TRUE)
		TNT1 A 0 A_SetPitch(pitch+0.8)
		SLDK ABCDEF 2
		TNT1 A 0 A_SetPitch(pitch-0.8)
		SLDK G 6 A_FireCustomMissile("KickAttack",0,0,0,0)
		TNT1 A 0 A_StopSound(5)
		TNT1 A 0 A_PlaySound("FKPlayer/slide/end",6)
		SLDK HI 2
		Goto Ready
	Knife:
		WP3G EF 1
		NULL A 0 Offset(-10,32)
		NULL A 1
		WP1L AB 1
		NULL A 0 A_Jump(86,2)
		NULL A 0 A_PlaySound("FKPlayer/Grunt")
		WP1L C 1 A_CustomPunch(8,0,0,"KnifePuff")
		WP1L DEF 1
		NULL A 1
		WP3G FE 1 Offset(0,32)
		Goto Ready
	Throwgrenade:
		TNT1 A 0 A_JumpIf(waterlevel>2,"Dryfire")
		TNT1 A 0 A_JumpIfInventory("BOGR1",1,1)
		Goto Dryfire
		WP3G EF 1
		TNT1 A 0 A_StopSound(1)
		TNT1 A 0 Offset(-20,32)
		TNT1 A 3 Offset(-20,32)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 A 1 Offset(0,28)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 B 1 Offset(0,24)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 C 1 Offset(0,23)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 D 1 Offset(0,26) A_PlaySound("weapons/SHG/throw")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 D 1 Offset(0,28)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_SpawnItemEx("RealGrenade",0,1,24,cos(pitch)*40,0,sin(-pitch)*40,3,SXF_TRANSFERPITCH|SXF_NOCHECKPOSITION)
		TNT1 A 0 A_TakeInventory("BOGR1",1)
		MND2 E 1 Offset(-3,30)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 E 1 Offset(-6,31)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 F 1 Offset(-9,32)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 F 1 Offset(-12,33)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_TakeInventory("GetOnWithIt", 100)
		TNT1 A 0 A_JumpIfNoAmmo("Dryfire")
		TNT1 A 5 Offset (75, 152)
		TNT1 A 1 Offset (6, 42)
		WP3G FE 1
		Goto Ready
	Flash:
		TNT1 A 7 Bright A_Light1
		Goto LightDone
		TNT1 A 7 Bright A_Light1
		Goto LightDone
 	Spawn:
		WP3P A -1
		Stop
	}
}

//==============================================================================
// Zwei Luftwaffe DP-65
//==============================================================================

ACTOR HDShotgunX2 : KriegslandLightWeapon
{
	+WEAPON.NOAUTOFIRE
	+INVENTORY.UNDROPPABLE
	Weapon.SelectionOrder 1100
	Weapon.SlotNumber 0
	Weapon.AmmoUse 1
	Weapon.AmmoGive 4
	Weapon.AmmoType "BOSH1"
	Inventory.Pickupmessage "You got the Luftwaffe DP-65!"
	Inventory.PickupSound 	"weapons/generic/pickup1"
	Obituary "%o's skull has been blown by %k's Dual DP-65."
	Tag "Zwei Luftwaffe DP-65"
	States
	{
	Deselect:
		TNT1 A 0 A_Gunflash("LightDone")
		WP3R CBA 1
		TNT1 A 0 A_TakeInventory("FireRight",1)
		TNT1 A 1 A_Lower
		Wait 
	Ready:
		WP3R ABC 1
		TNT1 A 0 A_TakeInventory("StopDualWield", 1)
		TNT1 A 0 A_GunFlash
		Goto ReadyToFire
	ReadyToFire:
		TNT1 A 0 A_JumpIfInventory("FiredPrimary",1,"FireLeftGun")
		W3LG A 1 A_WeaponReady(WRF_ALLOWZOOM)
		TNT1 A 0 A_JumpifInventory("IsKicking",1,"Kick")
		TNT1 A 0 A_JumpIfInventory("IsKnifing",1,"Knife")
		NULL A 0 A_JumpIfInventory("SlidePlayer",1,"IsSliding")
		TNT1 A 0 A_JumpifInventory("IsBombing",1,"ThrowGrenade")
		Loop
	Fire:
		TNT1 A 0 A_JumpIfInventory("FiredPrimary",1,"FireLeftGun")
		W3LG A 1
		TNT1 A 0 A_JumpifInventory("IsKicking",1,"Kick")
		TNT1 A 0 A_JumpIfInventory("IsKnifing",1,"Knife")
		NULL A 0 A_JumpIfInventory("SlidePlayer",1,"IsSliding")
		TNT1 A 0 A_JumpifInventory("IsBombing",1,"ThrowGrenade")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary",1,"FireLeftGun")
		Goto ReadyToFire
	Select:
		TNT1 A 0 A_Playsound("weapons/generic/select7",7)
		TNT1 A 0 Offset(67, 100)
		TNT1 A 0 Offset(54, 81)
		TNT1 A 0 Offset(32, 69)
		TNT1 A 0 Offset(22, 58)
		TNT1 A 0 Offset(10, 47)
		TNT1 A 0 Offset(7, 39)
		TNT1 A 0 Offset(2, 34)
		TNT1 A 0 Offset(0, 32)
		TNT1 A 1 A_Raise
		Wait
	FireLeftGun:
		TNT1 A 0 A_JumpIfInventory("BOSH1",1,1)
		Goto Dryfire
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_Playsound("weapons/SGN/fire",7)
		TNT1 A 0 A_FireBullets(3.6, 3.6, 7, 5,"Bullet_Puff")
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,-8,0,0,0)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		W3LF A 1 BRIGHT
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RecoilToggle")==0,2)
		TNT1 A 0 A_SetPitch(pitch -0.6)
		W3LG B 3 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_FireCustomMissile("FKShellCasingL",345+random(-8,8),0,2,-5,0)
		W3LG C 2 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_Playsound("weapons/SGN/pump2",6)
		W3LG D 2 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		W3LG E 2 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		W3LG A 4 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)//
		TNT1 AAA 0 A_JumpIfInventory("FiredPrimary",1,"FireLeftGun")
		Goto ReadyToFire
	FireRightGun:
		TNT1 A 0 A_JumpIfInventory("StopDualWield", 1, "LightDone")
		TNT1 A 0 A_GiveInventory("IsFiringSecondary", 1)
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("FiredSecondary",1)
		TNT1 A 0 A_JumpIfInventory("BOSH1",1,1)
		Goto Dryfire
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_Playsound("weapons/SGN/fire",7)
		TNT1 A 0 A_FireBullets(3.6, 3.6, 7, 5,"Bullet_Puff")
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,8,0,0,0)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		W3RF A 1 BRIGHT
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RecoilToggle")==0,2)
		TNT1 A 0 A_SetPitch(pitch -0.6)
		W3RG B 3 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_FireCustomMissile("FKShellCasingSpawn",345+random(-8,8),0,2,-5,0)
		W3RG C 2 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_Playsound("weapons/SGN/pump2",6)
		W3RG D 2 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		W3RG E 2 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		W3RG A 4 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_JumpIfInventory("StopDualWield", 1, "LightDone")
		TNT1 A 0 A_TakeInventory("IsFiringSecondary",1)
		TNT1 AAA 0 A_JumpIfInventory("FiredSecondary",1,"FireRightGun")
		Goto Flash
	Zoom:
		TNT1 A 0 A_Gunflash("LightDone")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WP3B A 2 A_SelectWeapon("HDShotgun")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		Goto ReadyToFire
	Dryfire:
		TNT1 A 0 A_Print("No ammo",1)
		TNT1 A 0 A_TakeInventory("IsFiringSecondary",1)
		TNT1 A 0 A_TakeInventory("FiredSecondary",1)
		WP3B A 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_GunFlash
		Goto ReadyToFire
	Kick:
		TNT1 A 0 A_Gunflash("LightDone")
		WP3R CBA 1
		TNT1 A 1
		KICF A 1 Offset(-10,32)
		KICF CE 1
		KICF FG 1 A_Recoil(-1)
		TNT1 A 0 A_Jump(128,2)
		TNT1 A 0 A_PlaySound("FKPlayer/Grunt")
		KICF H 5 A_CustomPunch(6,0,0,"FightPuff") 
		KICF IGFEDC 1 
		KICF BA 1 A_Recoil(+0.5)
		TNT1 A 1
		WP3R ABC 1
		TNT1 A 0 A_Gunflash
		Goto ReadyToFire
	IsSliding:
		TNT1 A 0 A_Gunflash("LightDone")
		TNT1 A 0 A_TakeInventory("SlidePlayer",1)
		TNT1 A 0 A_JumpIfInventory("CrouchPlayer",1,"Ready")
		WP3R CBA 1
		TNT1 A 0 A_PlaySound("FKPlayer/slide/start",4)
		TNT1 A 0 A_PlaySound("FKPlayer/slide/loop",5,0.5,TRUE)
		TNT1 A 0 A_SetPitch(pitch+0.8)
		SLDK ABCDEF 2
		TNT1 A 0 A_SetPitch(pitch-0.8)
		SLDK G 6 A_FireCustomMissile("KickAttack",0,0,0,0)
		TNT1 A 0 A_StopSound(5)
		TNT1 A 0 A_PlaySound("FKPlayer/slide/end",6)
		SLDK HI 2
		Goto Ready
	Knife:
		TNT1 A 0 A_Gunflash("LightDone")
		WP3R CBA 1
		NULL A 0 Offset(-10,32)
		NULL A 1
		WP1L AB 1
		NULL A 0 A_Jump(86,2)
		NULL A 0 A_PlaySound("FKPlayer/Grunt")
		WP1L C 1 A_CustomPunch(8,0,0,"KnifePuff")
		WP1L DEF 1
		NULL A 1
		WP3R ABC 1
		TNT1 A 0 A_Gunflash
		Goto ReadyToFire
	Throwgrenade:
		TNT1 A 0 A_GunFlash("LightDone")
		WP3R CBA 1
		TNT1 A 0 Offset(-10,36)
		TNT1 A 0 A_JumpIf(waterlevel>2,"Dryfire")
		TNT1 A 0 A_JumpIfInventory("BOGR1",1,1)
		Goto Dryfire
		TNT1 A 0 A_StopSound(1)
		TNT1 A 0 Offset(-20,32)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 A 1 Offset(0,28)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 B 1 Offset(0,24)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 C 1 Offset(0,23)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 D 1 Offset(0,26) A_PlaySound("weapons/SHG/throw")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 D 1 Offset(0,28)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_SpawnItemEx("RealGrenade",0,1,24,cos(pitch)*40,0,sin(-pitch)*40,3,SXF_TRANSFERPITCH|SXF_NOCHECKPOSITION)
		TNT1 A 0 A_TakeInventory("BOGR1",1)
		MND2 E 1 Offset(0,30)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 E 1 Offset(0,31)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 F 1 Offset(0,32)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		MND2 F 1 Offset(0,33)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_TakeInventory("GetOnWithIt", 100)
		TNT1 A 0 A_JumpIfNoAmmo("Dryfire")
		TNT1 A 7 Offset (75, 152)
		TNT1 A 1 Offset (6, 42)
		Goto Ready
	Flash:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("StopDualWield", 1, "LightDone")
		W3RG A 1
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "FireRightGun")
		Loop
	DontFlash:
		TNT1 A 1
		Goto Flash
 	Spawn:
		WP3P A -1
		Stop
	}
}