//==============================================================================
// Maschinenpistole 86s / MP-86s
//==============================================================================

ACTOR MGZoomed : Inventory { Inventory.MaxAmount 1 }

ACTOR HDChaingun : KriegslandMediumWeapon
{
	+INVENTORY.UNDROPPABLE
	Weapon.SelectionOrder 1000
	Weapon.AmmoUse 1
	Weapon.SlotNumber 4
	Weapon.AmmoGive 10
	Weapon.AmmoType "BOCL1"
	Scale 0.5
	Inventory.Pickupmessage "You got the Maschinenpistole 86s!"
	Obituary "%o does \"Mein Leben\" on %k's MP-86s."
	Tag "MP-86s"
	States
	{
	Deselect:
		NULL A 0 A_TakeInventory("MGZoomed",1)
		NULL A 0 A_ZoomFactor(1.0)
		NULL A 0 A_StopSound(6)
		WPCG A 1 Offset(2, 34)
		WPCG A 1 Offset(7, 39)
		WPCG A 1 Offset(10, 47)
		WPCG A 1 Offset(22, 58)
		WPCG A 1 Offset(32, 69)
		WPCG A 1 Offset(54, 81)
		WPCG A 1 Offset(67, 100)
		WPCG A 1 A_Lower
		Wait 
	Ready:
		TNT1 A 0 A_JumpIfInventory("MGZoomed",1,"ReadyZoomed")
		WPCG 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)
		WPCS 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))
		WPCS 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_TakeInventory("IAmZooming",1)
		Goto Ready
	Select:
		TNT1 A 0 A_Playsound("weapons/generic/select4",7)
		WPCG A 1 Offset(67, 100)
		WPCG A 1 Offset(54, 81)
		WPCG A 1 Offset(32, 69)
		WPCG A 1 Offset(22, 58)
		WPCG A 1 Offset(10, 47)
		WPCG A 1 Offset(7, 39)
		WPCG A 1 Offset(2, 34)
		WPCG A 1 A_Raise
		Wait
	Fire:
		TNT1 A 0 A_JumpIfInventory("BOCL1",1,1)
		Goto Dryfire
		TNT1 A 0 A_JumpIfInventory("MGZoomed",1,"FireZoomed")
		WPCF A 1 Offset(1,34)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCG B 1 Offset(2,36)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_Playsound("weapons/SMP/fire",6)
		TNT1 A 0 Radius_Quake(2, 2, 0, 1, 0)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_FireBullets(5.6, 5.6, 1, 8,"Bullet_Puff")
		TNT1 A 0 A_FireCustomMissile("FKLightCasingSpawn",345+random(-8,8),0,-4,-5,0)
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,8,0,0,0)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCF B 1 BRIGHT A_GunFlash
		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)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCF A 1 Offset(1,33) A_Refire
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCG A 1 Offset(0,32) A_Refire
		Goto Ready
	FireZoomed:
		TNT1 A 0 A_JumpIfInventory("BOCL1",1,1)
		Goto Dryfire
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_Playsound("weapons/SMP/fire",7)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_FireBullets(4.2, 4.2, 1, 8,"Bullet_Puff",1)
		TNT1 A 0 A_FireCustomMissile("FKLightCasingSpawn",0+random(-8,8),0,0,6,0)
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,0,0,0,0)
		TNT1 A 0 Radius_Quake(2, 2, 0, 1, 0)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCS B 1 BRIGHT Offset(0,34) A_ZoomFactor(2.035)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCS C 1 Offset(0,35) A_ZoomFactor(2.02)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCS A 1 Offset(0,33) A_ZoomFactor(2)
		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)
		TNT1 A 0 A_Refire
		Goto ReadyZoomed
	Dryfire:
		TNT1 A 0 A_Print("No ammo",1)
		Goto Ready
	Zoom:
		TNT1 A 0 A_JumpIfInventory("IAmUnzooming",1,"Ready")
		TNT1 A 0 A_JumpIfInventory("IAmZooming",1,"ReadyZoomed")
		TNT1 A 0 A_JumpIfInventory("MGZoomed",1,"UnZoom")
		TNT1 A 0 A_GiveInventory("MGZoomed",1)
		TNT1 A 0 A_PlaySound("weapons/generic/select")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCZ A 1 A_ZoomFactor(1.2)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCZ B 1 A_ZoomFactor(1.4)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCZ C 1 A_ZoomFactor(1.6)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCZ D 1 A_ZoomFactor(1.8)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCS A 1 A_ZoomFactor(2)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		NULL A 0 A_GiveInventory("IAmZooming",3)
		Goto Ready
	UnZoom:
		NULL A 0 A_PlaySound("weapons/generic/select")
		NULL A 0 A_StopSound(6)
		WPCZ D 1 A_ZoomFactor(1.8)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCZ C 1 A_ZoomFactor(1.6)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCZ B 1 A_ZoomFactor(1.4)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCZ A 1 A_ZoomFactor(1.2)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCG A 1 A_ZoomFactor(1.0)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_TakeInventory("MGZoomed",1)
		NULL A 0 A_GiveInventory("IAmUnzooming",6)
		Goto Ready
	Altfire:
		TNT1 A 0 A_JumpIfInventory("MGZoomed",1,"UnZoom")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCG A 2 A_JumpIfInventory("HDChaingunX2",1,"SelectAkimbo")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		Goto Ready
	SelectAkimbo:
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCG A 2 A_SelectWeapon("HDChaingunX2")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		Goto Ready
	Cross:
		WPCG A 1
		TNT1 A 0 A_JumpIfInventory("HDMachinegun",1,"SelectCross")
		Goto Ready
	SelectCross:
		NULL A 0 A_GiveInventory("HDCrossAkimbo3",1)
		WPCG A 1 A_SelectWeapon("HDCrossAkimbo3")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		Goto Ready
	Kick:
		TNT1 A 0 A_JumpIfInventory("MGZoomed",1,"UnZoom")
		WPCZ AB 1
		TNT1 A 2
		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 2
		WPCZ BA 1
		Goto Ready
	IsSliding:
		TNT1 A 0 A_JumpIfInventory("MGZoomed",1,"UnZoom")
		TNT1 A 0 A_TakeInventory("SlidePlayer",1)
		TNT1 A 0 A_JumpIfInventory("CrouchPlayer",1,"Ready")
		WPCZ AB 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_JumpIfInventory("MGZoomed",1,"UnZoom")
		WPCZ AB 1
 		NULL A 0 Offset(-10,32)
		NULL A 3
		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 3
		WPCZ BA 1
		Goto Ready
	Throwgrenade:
		TNT1 A 0 A_JumpIfInventory("MGZoomed",1,"UnZoom")
		TNT1 A 0 A_JumpIf(waterlevel>2,"Dryfire")
		TNT1 A 0 A_JumpIfInventory("BOGR1",1,1)
		Goto Dryfire
		WPCZ AB 1
		TNT1 A 0 A_StopSound(1)
		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)
		WPCZ BA 1
		Goto Ready
	Flash:
		TNT1 A 0 Bright A_Light1
		Goto LightDone
		TNT1 A 0 Bright A_Light2
		Goto LightDone
 	Spawn:
		WPCP A -1
		Stop
	}
}

//==============================================================================
// Zwei Maschinenpistole 86s
//==============================================================================

ACTOR FireRight2 : Inventory { Inventory.MaxAmount 1 }

ACTOR HDChaingunX2 : KriegslandMediumWeapon
{
	+INVENTORY.UNDROPPABLE
	Weapon.SelectionOrder 1100
	Weapon.SlotNumber 0
	Weapon.AmmoUse 1
	Weapon.AmmoGive 30
	Weapon.AmmoType "BOCL1"
	Inventory.Pickupmessage "You got another Maschinenpistole 86s!"
	Obituary "%o does \"Mein Leben\" all over the place from %k's Dual MP-86s."
	Tag "Zwei MP-86s"
	Scale 0.5
	States
	{
	Deselect:
		TNT1 A 0 A_Gunflash("LightDone")
		WPCR CBA 1
		TNT1 A 0 A_TakeInventory("FireRight",1)
		TNT1 A 1 A_Lower
		Wait 
	Ready:
		WPCR 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") //Check if player wants to reload
		WCLG A 1 A_WeaponReady(WRF_ALLOWZOOM)// Weapon is ready to fire
		TNT1 A 0 A_JumpifInventory("IsBombing",1,"ThrowGrenade")
		NULL A 0 A_JumpIfInventory("SlidePlayer",1,"IsSliding")
		TNT1 A 0 A_JumpIfInventory("IsKnifing",1,"Knife")
		TNT1 A 0 A_JumpifInventory("IsKicking",1,"Kick")
		Loop
	Fire:
		TNT1 A 0 A_JumpIfInventory("FiredPrimary",1,"FireLeftGun")
		WCLG 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/select4",7)
		TNT1 A 1 Offset(67, 100)
		TNT1 A 0 A_Raise
		TNT1 A 1 Offset(54, 81)
		TNT1 A 0 A_Raise
		TNT1 A 1 Offset(32, 69)
		TNT1 A 0 A_Raise
		TNT1 A 1 Offset(22, 58)
		TNT1 A 0 A_Raise
		TNT1 A 1 Offset(10, 47)
		TNT1 A 0 A_Raise
		TNT1 A 1 Offset(7, 39)
		TNT1 A 0 A_Raise
		TNT1 A 1 Offset(2, 34)
		TNT1 A 0 A_Raise
		Wait
	FireLeftGun:
		TNT1 A 0 A_JumpIfInventory("BOCL1",1,1)
		Goto Dryfire
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_Playsound("weapons/SMP/fire",6)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_FireBullets(7, 7, -1, 8,"Bullet_Puff")
		TNT1 A 0 A_FireCustomMissile("FKLightCasingL",345+random(-8,8),0,-4,-5,0)
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,-10,0,0,0)
		TNT1 A 0 Radius_Quake(2, 2, 0, 1, 0)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WCLF 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.9)
		WCLG B 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WCLG A 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WCRG 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("BOCL1",1,1)
		Goto Dryfire
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_Playsound("weapons/SMP/fire",6)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_FireBullets(7, 7, -1, 8,"Bullet_Puff")
		TNT1 A 0 A_FireCustomMissile("FKLightCasingSpawn",345+random(-8,8),0,-4,-5,0)
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,10,0,0,0)
		TNT1 A 0 Radius_Quake(2, 2, 0, 1, 0)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WCRF 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.9)
		WCRG B 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WCRG A 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_JumpIfInventory("StopDualWield", 1, "LightDone")
		TNT1 A 0 A_TakeInventory("IsFiringSecondary",1)
		WCLG AAA 0 A_JumpIfInventory("FiredSecondary",1,"FireRightGun")
		Goto Flash
	Dryfire:
		TNT1 A 0 A_Print("No ammo",1)
		TNT1 A 0 A_TakeInventory("IsFiringSecondary",1)
		TNT1 A 0 A_TakeInventory("FiredSecondary",1)
		WPCB A 1 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		TNT1 A 0 A_GunFlash
		Goto ReadyToFire
	Zoom:
		TNT1 A 0 A_Gunflash("LightDone")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		WPCB A 2 A_SelectWeapon("HDChaingun")
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSecondary|WRF_NoSwitch)
		Goto ReadyToFire
	Kick:
		TNT1 A 0 A_Gunflash("LightDone")
		WPCR CBA 1
		TNT1 A 2
		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 2
		WPCR 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")
		WPCR CBA 1
		TNT1 A 0 A_JumpIfInventory("CrouchPlayer",1,"Ready")
		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")
		WPCR CBA 1
		TNT1 A 3
		TNT1 A 0 Offset(-10,32)
		WP1L AB 1
		TNT1 A 0 A_Jump(86,2)
		TNT1 A 0 A_PlaySound("FKPlayer/Grunt")
		WP1L C 1 A_CustomPunch(8,0,0,"KnifePuff")
		WP1L DEF 1
		TNT1 A 6
		WPCR ABC 1
		TNT1 A 0 A_Gunflash
		Goto ReadyToFire
	Throwgrenade:
		TNT1 A 0 A_Gunflash("LightDone")
		TNT1 A 0 A_JumpIf(waterlevel>2,"Dryfire")
		TNT1 A 0 A_JumpIfInventory("BOGR1",1,1)
		Goto Dryfire
		WPCR CBA 1
		TNT1 A 0 A_StopSound(1)
		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")
		WCRG A 1
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "FireRightGun")
		Loop
	DontFlash:
		TNT1 A 1
		Goto Flash
 	Spawn:
		WPCP A -1
		Stop
	}
}