// --------------------------------------------------------------------------
//
// HE Grenade (Demo weapon "Appears on weapons training")
//
// --------------------------------------------------------------------------

ACTOR "HE GRENADE_RAT" : "HE Grenade" //5010
{
//	+POWERED_UP 
//	Weapon.SisterWeapon "HE Grenade"

	Weapon.SelectionOrder 1900
	Weapon.AmmoUse 1
	Weapon.AmmoGive 1
	Weapon.AmmoType "HEGRENADEAmmo_rat"
	obituary "%k killed %o with HE Grenade."
//	+WEAPON.WIMPY_WEAPON
//	+WEAPON.AMMO_CHECKBOTH
	Inventory.Pickupmessage "Pickep up a HE Grenade."
	Tag "High Explosive Grenade"
	Weapon.UpSound "HEGRENADE/Ready"
	AttackSound "HEGRENADE/Fire" 
	Scale 0.2
	 +IGNORESKILL
	 +WEAPON.EXPLOSIVE
	//+NOAUTOFIRE

	States
	{

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

	AltFire:
//				TNT1 A 1 A_ZoomFactor(1.0)
		TNT1 A 0 A_PlayWeaponSound("Knife/Slash")
		W19H ABC 1 A_WeaponReady(WRF_NOFIRE)
//	  TNT1 A 0 A_GiveInventory("RAT_Knife_Activated", 1)
		W19H D 1 A_CustomPunch(32, 0, 0, "KnifePuff2", 128)//, 0.175, 50)//A_GunFlash
		W19H EFGHIJKLMNOPQRSQRS 1 A_WeaponReady(WRF_NOFIRE)
//		W19H LMNOPQRSTUVWXYZ 1 A_WeaponReady(WRF_NOFIRE)
		Goto Select_RAT


	Select_RAT:
		TNT1 A 0 A_PlaySound ("HEGRENADE/Ready")
		Goto Select+6	
*/		



	Select:
	TNT1 A 1 A_Raise
	TNT1 AA 0 A_Raise
	TNT1 A 0 ACS_ExecuteAlways(798, 0, 245, 0, 0)//Weapon Weight
	TNT1 A 1 A_TakeInventory("CrosshairType",2)
	
		TNT1 A 1 A_WEAPONREADY(WRF_NOFIRE)
		TNT1 A 1 A_JumpIfNoAmmo("NoGrenade")//Knife

		TNT1 A 4 A_WEAPONREADY(WRF_NOFIRE)

		Goto Fire
		


	NoGrenade:
	TNT1 A 1 A_Print("You don't have enough grenades.")
		Goto SelectUsed+1



	Fire:
		TNT1 A 4 A_FireCustomMissile(HEGRENADEPROJECTILE,0,1,0,3,0,4)//A_GunFlash
		W16F EFGH 1 A_WEAPONREADY(WRF_NOFIRE)
		TNT1 A 4 A_WEAPONREADY(WRF_NOFIRE)
		Goto SelectUsed



	SelectUsed:
		TNT1 A 6 //A_PlaySound("HEGRENADE/Ready")
		TNT1 A 3 //A_PlaySound("HEGRENADE/Ready")
	TNT1 A 0 ACS_NamedExecuteAlways("HSPreviousWeapon", 0, 0, 0, 0)
	TNT1 A 1 A_WeaponReady(WRF_NOFIRE)
Goto Ready

	}
}


