// --------------------------------------------------------------------------
//
// Default base weapon 
//
// --------------------------------------------------------------------------


ACTOR Fire_Holdkey : Inventory				{   Inventory.MaxAmount 5	}
ACTOR Grenade_BlockMemo : Inventory				{   Inventory.MaxAmount 1	}


actor CSDMOWeapon : Weapon
{
//	Game Doom

//Basic configuration
  obituary "%k killed %o."
  hitobituary "%k pummeled %o."
  inventory.pickupmessage "Picked up an item!"  
  inventory.pickupsound "misc/WeaponPickup"
  weapon.selectionorder 500
  weapon.kickback 50
  decal NewBulletChip
  AttackSound "DSEMPTY"
  
 //Weapon.UpSound "weapons/sawup"

//Common flags
  //+NOAUTOFIRE
  +NOALERT
  +IGNORESKILL
  +WEAPON.NOAUTOAIM
//  +INVENTORY.UNDROPPABLE
  +INVENTORY.UNTOSSABLE

//  +DONTBOB
	Weapon.BobStyle Alpha
	Weapon.BobSpeed 1.5
	Weapon.BobRangeX 0.0
	Weapon.BobRangeY 0.75

  States
  {
  //Generic states

	Deselect:
				TNT1 A 0 A_StopSound (6)
				TNT1 A 1 A_ZoomFactor(1.0)
    TNT1 A 0 A_TakeInventory("CrosshairType",2)
                TNT1 AAAAAAAAAAAAAAAAA 0 A_Lower
                TNT1 AAAAAA 1 A_Lower
		Loop

	DeselectLoop:
				TNT1 A 0 A_StopSound (6)
				TNT1 A 1 A_ZoomFactor(1.0)
    TNT1 A 0 A_TakeInventory("CrosshairType",2)
                TNT1 AAAAAAAAAAAAAAAAA 0 A_Lower
                TNT1 AAAAAA 1 A_Lower
		Loop


	Select:
				TNT1 A 0 A_Raise
				TNT1 A 1 A_WeaponReady
		Goto Ready

	Ready:
				TNT1 A 1 A_WeaponReady
		Loop

	Fire:
				TNT1 A 1 A_GunFlash
		Goto Ready


/*
	Altfire:
	Melee:
    //TNT1 A 0 A_JumpIfCloser(64, "altfire_max")
	
	TNT1 A 1 A_PlayWeaponSound("Knife/Slash")	TNT1 A 0 A_JUMP(256,1,"ALTFIRE2")	TNT1 A 1	
	Goto AltFire1

	AltFire1:
		W19D A 1 A_CustomPunch(9, 0, 0, "KnifePuff", 96)//A_GunFlash
		W19D BCDEFGHIJKLM 1 A_WeaponReady(WRF_NOFIRE)

		W19D N 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire_max")
		W19D O 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire_max")
		W19D P 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire_max")
		W19D Q 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire_max")
		W19D R 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire_max")
		W19D S 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire_max")
		W19D T 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire_max")
		W19D U 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire_max")
		Goto SelectUsed_RAT

	AltFire2:
		W19F A 1 A_CustomPunch(9, 0, 0, "KnifePuff", 96)//A_GunFlash
		W19F BCDEFGHIJKLM 1 A_WeaponReady(WRF_NOFIRE)

		W19F N 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire1")
		W19F O 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire1")
		W19F P 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire1")
		W19F Q 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire1")
		W19F R 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire1")
		W19F S 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire1")
		W19F T 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire1")
		W19F U 1 A_WeaponReady(WRF_NOFIRE)	TNT1 A 0 A_JumpIfCloser(72, "altfire1")
		Goto SelectUsed_RAT
	
	
	AltFire_max:
		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
		W19H EFGHIJKLMNOPQRSQRSQRS 1 A_WeaponReady(WRF_NOFIRE)
		Goto SelectUsed_RAT





	SelectUsed_RAT:
		TNT1 A 2   
		TNT1 A 0 A_GiveInventory("If_melee_RAT",1)


TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",46,"ChangeW46")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",45,"ChangeW45")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",44,"ChangeW44")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",43,"ChangeW43")
//TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",42,"ChangeW42")		//unused
//TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",41,"ChangeW41")		//unused
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",40,"ChangeW40")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",39,"ChangeW39")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",38,"ChangeW38")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",37,"ChangeW37")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",36,"ChangeW36")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",35,"ChangeW35")	//TEST
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",34,"ChangeW34")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",33,"ChangeW33")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",32,"ChangeW32")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",31,"ChangeW31")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",30,"ChangeW30")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",29,"ChangeW29")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",28,"ChangeW28")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",27,"ChangeW27")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",26,"ChangeW26")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",25,"ChangeW25")	//TEST
//TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",24,"ChangeW24")		//unused
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",23,"ChangeW23")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",22,"ChangeW22")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",21,"ChangeW21")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",20,"ChangeW20")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",19,"ChangeW19")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",18,"ChangeW18")	//TEST
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",17,"ChangeW17")
//TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",16,"ChangeW16")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",15,"ChangeW15")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",14,"ChangeW14")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",13,"ChangeW13")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",12,"ChangeW12")	//TEST
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",11,"ChangeW11")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",10,"ChangeW10")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",9,"ChangeW09")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",8,"ChangeW08")		//TEST
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",7,"ChangeW07")
//TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",6,"ChangeW06")		//unused
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",5,"ChangeW05")		//TEST
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",4,"ChangeW04")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",3,"ChangeW03")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",2,"ChangeW02")
TNT1 A 0 A_JumpIfInventory("SetWeaponMemory",1,"ChangeW01")

		Goto Ready



	ChangeW01:	TNT1 A 0 A_SelectWeapon("AK47_RAT")				Goto Ready
	ChangeW02:	TNT1 A 0 A_SelectWeapon("Aug_RAT")				Goto Ready
	ChangeW03:	TNT1 A 0 A_SelectWeapon("AWP_RAT")				Goto Ready
	ChangeW04:	TNT1 A 0 A_SelectWeapon("BIZON_RAT")			Goto Ready
	ChangeW05:	TNT1 A 0 A_SelectWeapon("C4_RAT")				Goto Ready	//test
	//ChangeW06:
	ChangeW07:	TNT1 A 0 A_SelectWeapon("DEAGLE_RAT")			Goto Ready
	ChangeW08:	TNT1 A 0 A_SelectWeapon("DECOY_RAT")			Goto Ready	//test
	ChangeW09:	TNT1 A 0 A_SelectWeapon("ELITE_RAT")			Goto Ready
	ChangeW10:	TNT1 A 0 A_SelectWeapon("FAMAS_RAT")			Goto Ready
	ChangeW11:	TNT1 A 0 A_SelectWeapon("FIVESEVEN_RAT")		Goto Ready
	ChangeW12:	TNT1 A 0 A_SelectWeapon("FLASHBANG_RAT")		Goto Ready	//test
	ChangeW13:	TNT1 A 0 A_SelectWeapon("G3SG1_RAT")			Goto Ready
	ChangeW14:	TNT1 A 0 A_SelectWeapon("GALILAR_RAT")			Goto Ready
	ChangeW15:	TNT1 A 0 A_SelectWeapon("GLOCK_RAT")			Goto Ready
	//ChangeW16:	TNT1 A 0 A_SelectWeapon("HEGRENADE_RAT")		Goto Ready	//UNUSED
	ChangeW17:	TNT1 A 0 A_SelectWeapon("HKP2000_RAT")			Goto Ready
	ChangeW18:	TNT1 A 0 A_SelectWeapon("INCGRENADE_RAT")		Goto Ready	//TEST
	ChangeW19:	TNT1 A 0 A_SelectWeapon("KNIFE_RAT")			Goto Ready	//UNUSED
	ChangeW20:	TNT1 A 0 A_SelectWeapon("M4A1_RAT")				Goto Ready
	ChangeW21:	TNT1 A 0 A_SelectWeapon("M249_RAT")				Goto Ready
	ChangeW22:	TNT1 A 0 A_SelectWeapon("MAC10_RAT")			Goto Ready
	ChangeW23:	TNT1 A 0 A_SelectWeapon("MAG7_RAT")				Goto Ready
	//ChangeW24:
	ChangeW25:	TNT1 A 0 A_SelectWeapon("MOLOTOV_RAT")			Goto Ready	//TEST
	ChangeW26:	TNT1 A 0 A_SelectWeapon("MP7_RAT")				Goto Ready
	ChangeW27:	TNT1 A 0 A_SelectWeapon("MP9_RAT")				Goto Ready
	ChangeW28:	TNT1 A 0 A_SelectWeapon("NEGEV_RAT")			Goto Ready
	ChangeW29:	TNT1 A 0 A_SelectWeapon("NOVA_RAT")				Goto Ready
	ChangeW30:	TNT1 A 0 A_SelectWeapon("P90_RAT")				Goto Ready
	ChangeW31:	TNT1 A 0 A_SelectWeapon("P250_RAT")				Goto Ready
	ChangeW32:	TNT1 A 0 A_SelectWeapon("SAWEDOFF_RAT")			Goto Ready
	ChangeW33:	TNT1 A 0 A_SelectWeapon("SCAR20_RAT")			Goto Ready
	ChangeW34:	TNT1 A 0 A_SelectWeapon("SG553_RAT")			Goto Ready
	ChangeW35:	TNT1 A 0 A_SelectWeapon("SMOKEGRENADE_RAT")		Goto Ready	//TEST
	ChangeW36:	TNT1 A 0 A_SelectWeapon("SSG08_RAT")			Goto Ready
	ChangeW37:	TNT1 A 0 A_SelectWeapon("TASER_RAT")			Goto Ready
	ChangeW38:	TNT1 A 0 A_SelectWeapon("TEC9_RAT")				Goto Ready
	ChangeW39:	TNT1 A 0 A_SelectWeapon("UMP45_RAT")			Goto Ready
	ChangeW40:	TNT1 A 0 A_SelectWeapon("XM1014_RAT")			Goto Ready
//	ChangeW41:	TNT1 A 0 A_SelectWeapon("_RAT")			Goto Ready	//UNUSED
//	ChangeW42:	TNT1 A 0 A_SelectWeapon("_RAT")			Goto Ready	//UNUSED
	ChangeW43:	TNT1 A 0 A_SelectWeapon("CZ75A_RAT")			Goto Ready
	ChangeW44:	TNT1 A 0 A_SelectWeapon("USP_RAT")				Goto Ready
	ChangeW45:	TNT1 A 0 A_SelectWeapon("m4a1 silenced_RAT")			Goto Ready
	ChangeW46:	TNT1 A 0 A_SelectWeapon("REVOLVER_RAT")			Goto Ready
*/





//  Flash:
//    TNT1 A 35 A_GiveInventory("Firing",1)
//    TNT1 A 0 A_TakeInventory("Firing",1)
//    stop
  }
}



