Actor GuyGL: Weapon{
	Inventory.RestrictedTo "Stickguyclass"
	Weapon.AmmoUse 1
	Weapon.AmmoType "RocketAmmo"
	Weapon.SelectionOrder 1900
	Weapon.SlotNumber 5
	Weapon.AmmoGive 4
	+Weapon.noalert
	+WEAPON.EXPLOSIVE
    Inventory.Pickupmessage "A granade launcher? interesting..."
    Tag "Granade launcher"
	STATES
	{
	  Ready:
		REGL A 1 A_weaponready(WRF_ALLOWRELOAD)
		Loop
	  Deselect:
		REGL A 1 A_Lower
		Loop
	  Select:
		REGL A 1 A_Raise
		Loop
	  Fire:
		REGL A 0 A_Jumpifinventory("RocketAmmo",1,1)
		Goto Click
		FireContinue:
		TNT1 A 0 A_JumpIfInventory("Stickguyfastfingers",1,"SpeedFire")
		REGL A 2 A_FireCustomMissile("Poisonade",0,1,0,0,0)
		TNT1 A 0 A_SetPitch (pitch-0.8)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_PlaySound("Stickguy/REGLSH", CHAN_WEAPON)
		REGL C 1 Offset(0,48) A_SetPitch (pitch+0.2)
		REGL B 3 Offset(0,44) A_SetPitch (pitch+0.2)
		REGL D 2 Offset(0,40) A_SetPitch (pitch+0.2)
		REGL E 2 Offset(0,36) A_SetPitch (pitch+0.2)
		REGL A 2 A_JumpifNoAmmo("Ready")
		Restoffire:
		REGL A 2 Offset(-2,33)
		REGL A 2 Offset(-5,34)
		REGL A 2 Offset(12,37)
		REGL F 2 Offset(6,36)A_playsound("Stickguy/REGLOP",3)
		REGL F 2 Offset(5,35)
		REGL F 1 Offset(4,34) 
		REGL F 2 Offset(2,33)
		REGL F 7 Offset(0,32) A_Gunflash("NadeLoading")
		REGL G 12 A_playsound("Stickguy/REGLLD",3)
		REGL H 2 Offset(-5,33) A_playsound("Stickguy/REGLCL",3)
		REGL H 2 Offset(-2,35)
		REGL H 2 Offset(1,40)
		REGL E 2 Offset(-5,33)
		REGL A 2 Offset(-2,32)
		REGL A 2 A_ReFire
		Goto Ready
		NadeLoading: //FLASH
		TNT1 A 4
		RGLH A 2 
		RGLH B 2
		RGLH C 2
		RGLH D 2
		RGLH E 2
		Goto LightDone
	   Speedfire:
		REGL A 0 A_Jumpifinventory("RocketAmmo",1,1)
		Goto Click
		TNT1 A 0 A_JumpIfInventory("Stickguyfastfingers",1,"SpeedFireContinue")
		Goto FireContinue
		SpeedFireContinue:
		REGL A 2 Bright A_FireCustomMissile("Sticknade",random(-10,10),1,0,8,0,random(-2,2))
		REGL B 0 A_SetPitch (pitch-0.8)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_PlaySound("Stickguy/REGLSH", CHAN_WEAPON)
		REGL B 2 Offset(0,48) A_SetPitch (pitch+0.2)  
		REGL C 2 Offset(0,44) A_SetPitch (pitch+0.2)
		REGL D 2 Offset(0,40) A_SetPitch (pitch+0.2)
		REGL E 2 Offset(0,36) A_SetPitch (pitch+0.2)
		REGL A 6
		TNT1 A 0 A_Refire("Speedfire")
		Goto RestOfFire
	   Click:
		"####" "#" 2 Offset(0,48) A_PlaySound("Stickguy/Tick", CHAN_WEAPON)
		"####" "#" 2 Offset(0,40)
		"####" "#" 2 Offset(0,32)
		Goto ready
	  Flash:
		REGL BC 2 Bright A_Light1
		REGL DE 2 Bright A_Light2
		Goto LightDone
	  Spawn:
		REGP A -1
		Stop
	//---------------------------------------MELEE STUFF
	  Altfire:
		TNT1 A 0 Offset(0,32) A_JumpIfInventory("GuyStick",1,"XiaoMelee")
		TNT1 A 1 Offset(0,32) A_JumpIfInventory("StickguyMeleeStack",20,"BerserkFire")
	  QuickPunch:
		REFT D 2 A_FireCustomMissile("FistImpact",0,0,0,1)
		REFT D 2 Offset(-2,32) A_AlertMonsters 
		REFT C 2 Offset(0,32)
		REFT B 2
		TNT1 A 6
		Goto Ready
	  BerserkFire:
		REFT M 1 Offset(104,18) A_FireCustomMissile("ZerkFist",0,0,0,1)
		REFT N 2 Offset(0,32) A_AlertMonsters
		REFT P 2 
		REFT P 2 
		REFT U 1 
		TNT1 A 1 Offset(0,32)
		Goto Ready
	  XiaoMelee:
		TNT1 A 1 Offset(0,32) A_JumpIfInventory("StickguyMeleeStack",10,"XiaoZerk")
		RXXS A 2 A_FireCustomMissile("StickImpact",0,0,0,1)
		RXXS B 2 A_alertMonsters
		Goto RestOfStickmelee	
	  XiaoZerk:
		RXXS E 2 A_FireCustomMissile("ZerkStick",0,0,0,1)
		RXXS F 2 A_alertMonsters
	  RestOfStickmelee:
		RXXS CD 2
		TNT1 A 4
		Goto Ready
	}
}