// --------------------------------------------------------------------------
//
// Glock (Weapon)
//
// --------------------------------------------------------------------------



ACTOR "Glock_RAT" : Glock //5010
{
	+POWERED_UP 
	Weapon.SisterWeapon Glock

//+AMMO_OPTIONAL

	Weapon.SelectionOrder 1900

  weapon.ammotype "9mmAmmo"
  weapon.ammouse 1
  weapon.ammogive 20
	obituary "%k killed %o with Glock-18."
	+WEAPON.WIMPY_WEAPON
	Inventory.Pickupmessage "Picked up a Glock-18."
	Tag "Glock-18"
	Weapon.UpSound "Glock/Ready"
	//AttackSound "Glock/Fire" 
	Scale 0.2
	+NOAUTOFIRE

	States
	{

	
	AltFire:
	TNT1 A 0 ACS_Execute(781, 0, 0, 0, 0)
	Goto Ready
	
	/*

	AltFire:
//				TNT1 A 1 A_ZoomFactor(1.0)
	  //"####" A 0 SetPlayerProperty(PROP_TOTALLYFROZEN,1,0)
		TNT1 A 0 A_PlayWeaponSound("Knife/Slash")
		W19H ABC 1 A_WeaponReady(WRF_NOFIRE)
		W19H D 1 A_CustomPunch(32, 0, 0, "KnifePuff2", 128)//, 0.175, 50)//A_GunFlash
	  //"####" A 0 SetPlayerProperty(PROP_TOTALLYFROZEN,0,0)
		W19H EFGHIJKLMNOPQRSQRSQRS 1 A_WeaponReady(WRF_NOFIRE)
//		W19H LMNOPQRSTUVWXYZ 1 A_WeaponReady(WRF_NOFIRE)
		Goto Select_RAT
		
Select_RAT:
		TNT1 A 0 A_PlaySound ("Glock/Ready")
Goto Select+6
*/



		
		

	Fire:

	W15E K 0 A_JumpIfNoAmmo("Ready")
	TNT1 A 0 A_JumpIfInventory("IsBot",1,"BotFire")
	TNT1 A 0 A_JumpIfInventory("Glockwillburst", 1, "FireBurst")
	
		W15D A 1 A_GunFlash
		W15D B 1 A_WEAPONREADY(WRF_NOFIRE)
		W15D C 1 A_WEAPONREADY(WRF_NOFIRE)
		//W15D D 1

		//TNT1 A 0 A_Refire
		W15D D 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D E 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D F 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D G 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D H 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D I 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D J 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D K 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D L 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D M 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D N 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D O 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D P 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D Q 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D R 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D S 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D T 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D U 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D V 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D W 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D X 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D Y 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D Z 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")
		


		W15E A 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E B 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E C 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E D 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E E 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E F 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E G 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E H 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E I 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E J 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E K 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")
		
		Goto Ready



	FireBurst:

	W15E K 0 A_JumpIfNoAmmo("Ready")	
		W15D A 1 A_GunFlash
		W15D B 1 A_WEAPONREADY(WRF_NOFIRE)
	W15E K 0 A_JumpIfNoAmmo("Ready")	
		W15D C 1 A_GunFlash
		W15D A 1 A_WEAPONREADY(WRF_NOFIRE)
	W15E K 0 A_JumpIfNoAmmo("Ready")	
		W15D B 1 A_GunFlash
		W15D C 1 A_WEAPONREADY(WRF_NOFIRE)
		//TNT1 A 0 A_Refire
		W15D DEFGHIJKLMNO 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_Refire
		
		
				W15D P 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D Q 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D R 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D S 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D T 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D U 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D V 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D W 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D X 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D Y 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15D Z 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")
		
		
		W15E A 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E B 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E C 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E D 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E E 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E F 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E G 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E H 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E I 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E J 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")

		W15E K 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"ToBurst")
		Goto Ready






	}
}