// *******************************************************************************************************
// 									Actions
// *******************************************************************************************************

	// --------------------------------------------------------------------------------------------------------------
	//								Base actions
	// --------------------------------------------------------------------------------------------------------------
		class NoActionsAll: CfgManActions
		{
			access = ReadOnlyVerified;
		};
		class NoActions: NoActionsAll
		{
			// default actions - for all states
			ladderOnDown = "LadderDownStart"; // now unused
			ladderOnUp = "LadderUpStart"; // now unused
			turnSpeed=1;
			upDegree=-1; // no corresponding degree
			limitFast = 5;
		};
		class DeadActions: NoActions
		{
			upDegree=ManPosDead;
		};
		class CargoActions: NoActions
		{
			die="DeadState";
		};

		// defines universal actions used by all action classes
		class NoActionsBase:NoActions
		{
			Combat="RifleStand";
			Crouch="RifleCrouch";
			Lying="RifleLying";
			WeaponOn="ATCrouch";
			WeaponOff="ATSafeCrouch";
			Civil="CivilStand";
			CivilLying="CivilLying";
			Stand="RifleSafeStand";
			HandGunOn="PistolStand";
		};
		
	// --------------------------------------------------------------------------------------------------------------
	// 						Neutral Base Actions
	// --------------------------------------------------------------------------------------------------------------
		
		// dummy actions used by neutralbase class
		class NeutralStandActions:NoActions{};
		class NeutralCrouchActions:NoActions{};
		class NeutralLyingActions:NoActions{};
		
	// --------------------------------------------------------------------------------------------------------------
	//								AT
	// --------------------------------------------------------------------------------------------------------------
	#define State AT
		// Crouch
			#define Stance Crouch
			class ATCrouchActions:NoActionsBase
			{
				stop="ATCrouch_loop";
				stopRelaxed="ATCrouchRelaxed_loop";
				default = "ATCrouch";
				die="ATCrouchDead";
				reloadAT="ATCrouchReloadAT";
				RTMACTIONS_Basic(ATSafe,Stance)
				HandGunOn="ATPistolCrouch";
				up="ATSafeStand";
				down="ATSafeLying";
				fireNotPossible="ATCrouch";
				//RTMACTIONS_Run(StateBase,Stance)
				RTMACTIONS_CrouchSpeeds
				upDegree=ManPosWeapon;
			};
			
	// --------------------------------------------------------------------------------------------------------------
	//								AT Pistol
	// --------------------------------------------------------------------------------------------------------------
	#define State ATPistol
		// Stand
			#define Stance Stand
			
			class ATPistolStandActions:NoActionsBase
			{
				stop="ATPistolStand_loop";
				stopRelaxed="ATPistolStandRelaxed_loop";
				default = "ATSafeStand";
				die="ATPistolStandDead";
				reloadMagazine="ATPistolStandReloadMagazine";
				RTMACTIONS_Basic(State,Stance)
				HandGunOff="ATSafeStand";
				down="ATPistolLying";
				up="ATPistolCrouch";
				RTMACTIONS_Run(State,Stance)
				RTMACTIONS_StandSpeeds
				upDegree=ManPosHandGunStand;
			};
			RTMACTIONS_COMBATRUNACTIONS(State,Stance,Crouch)
			RTMACTIONS_BINOC(State,Stance,ManPosBinoc)
		// Crouch
			#define Stance Crouch
			class ATPistolCrouchActions:ATPistolStandActions
			{
				stop="ATPistolCrouch_loop";
				stopRelaxed="ATPistolCrouchRelaxed_loop";
				default = "ATSafeCrouch";
				die="ATPistolCrouchDead";
				reloadMagazine="ATPistolCrouchReloadMagazine";
				RTMACTIONS_Basic(State,Stance)
				HandGunOff="ATSafeCrouch";
				down="ATPistolLying";
				up="ATPistolStand";
				RTMACTIONS_Run(State,Stance)
				RTMACTIONS_CrouchSpeeds
				upDegree=ManPosHandGunCrouch;
			};
			RTMACTIONS_COMBATRUNACTIONS(State,Stance,Stand)
			RTMACTIONS_BINOC(State,Stance,ManPosBinoc)
		// Lying
			#define Stance Lying
			class ATPistolLyingActions:ATPistolStandActions
			{
				stop="ATPistolLying_loop";
				stopRelaxed="ATPistolLyingRelaxed_loop";
				default = "ATSafeLying";
				die="ATPistolLyingDead";
				reloadMagazine="ATPistolLyingReloadMagazine";
				RTMACTIONS_Basic(State,Stance)
				HandGunOff="ATSafeLying";
				down="ATPistolStand";
				up="ATPistolCrouch";
				RTMACTIONS_Crawl(State)
				RTMACTIONS_LyingSpeeds
				upDegree=ManPosHandGunLying;
			};
			RTMACTIONS_BINOC(State,Stance,ManPosBinocLying)
	
	ECA_NEUTRALACTIONS(State)
	
	// --------------------------------------------------------------------------------------------------------------
	//								AT Safe
	// --------------------------------------------------------------------------------------------------------------
	#define State ATSafe
		// Stand
			#define Stance Stand
			class ATSafeStandActions:NoActionsBase
			{
				stop="ATSafeStand_loop";
				default = "ATSafeStand";
				die="ATSafeStandDead";
				RTMACTIONS_Basic(State,Stance)
				HandGunOn="ATPistolStand";
				down="ATSafeLying";
				up="ATSafeCrouch";
				fireNotPossible="ATCrouch";
				RTMACTIONS_SafeRun(State,Stance)
				RTMACTIONS_SafeStandSpeeds
				upDegree=ManPosNoweapon; // ManPosStand works ok if has another weapon, else use was ManPosNoweapon
			};
			RTMACTIONS_SAFERUNACTIONS(State,Stance,Crouch)
			RTMACTIONS_BINOC(State,Stance,ManPosBinocStand)
		// Crouch
			#define Stance Crouch
			class ATSafeCrouchActions:ATSafeStandActions
			{
				stop="ATSafeCrouch_loop";
				default = "ATSafeCrouch";
				die="ATSafeCrouchDead";
				RTMACTIONS_Basic(State,Stance)
				HandGunOn="ATPistolCrouch";
				down="ATSafeLying";
				up="ATSafeStand";
				RTMACTIONS_SafeRun(State,Stance)
				RTMACTIONS_SafeCrouchSpeeds
				upDegree=ManPosNoweapon; // ManPosStand works ok if has another weapon, else use was ManPosNoweapon
			};
			RTMACTIONS_SAFERUNACTIONS(State,Stance,Stand)
			RTMACTIONS_BINOC(State,Stance,ManPosBinocStand)
		// Lying
			#define Stance Lying
			class ATSafeLyingActions:ATSafeStandActions
			{
				stop="ATSafeLying_loop";
				default = "ATSafeLying";
				die="ATSafeLyingDead";
				RTMACTIONS_Basic(State,Stance)
				HandGunOn="ATPistolLying";
				down="ATSafeStand";
				up="ATSafeCrouch";
				RTMACTIONS_Crawl(State)
				RTMACTIONS_SafeLyingSpeeds
				upDegree=ManPosLyingNoWeapon; // ManPosLying works ok if has another weapon, else use ManPosLyingNoWeapon
			};
			RTMACTIONS_BINOC(State,Stance,ManPosBinocLying)

	ECA_NEUTRALACTIONS(State)
	
	// --------------------------------------------------------------------------------------------------------------
	//								Civil
	// --------------------------------------------------------------------------------------------------------------
	#define State Civil
		// Stand
			#define Stance Stand
			class CivilStandActions:NoActionsBase
			{
				stop="CivilStand";
				default = "CivilStand";
				die="CivilStandDead";
				RTMACTIONS_Basic(State,Stance)
				down="CivilLying";
				up="CivilCrouch";
				RTMACTIONS_SafeRun(State,Stance)
				RTMACTIONS_StandSpeeds
				upDegree=ManPosNoWeapon;
			};
			RTMACTIONS_DefaultVar(State,Stand,1);
			RTMACTIONS_SAFERUNACTIONS(State,Stance,Crouch)
			RTMACTIONS_BINOC(State,Stance,ManPosBinocStand)
		// Crouch
			#define Stance Crouch
			class CivilCrouchActions:CivilStandActions
			{
				stop="CivilCrouch_loop";
				default = "CivilCrouch_loop";
				die="CivilCrouchDead";
				RTMACTIONS_Basic(State,Stance)
				up="CivilStand";
				RTMACTIONS_SafeRun(State,Stance)
				RTMACTIONS_CrouchSpeeds
				upDegree=ManPosNoWeapon;
			};
			RTMACTIONS_SAFERUNACTIONS(State,Stance,Stand)
			RTMACTIONS_BINOC(State,Stance,ManPosBinocStand)
		// Lying
			#define Stance Lying
			class CivilLyingActions:CivilStandActions
			{
				stop="CivilLying_loop";
				default = "CivilLying_loop";
				die="CivilLyingDead";
				RTMACTIONS_Basic(State,Stance)
				down="CivilStand";
				up="CivilCrouch";
				RTMACTIONS_Crawl(State)
				RTMACTIONS_LyingSpeeds
				upDegree=ManPosLyingNoWeapon;
			};
			RTMACTIONS_BINOC(State,Stance,ManPosBinocLying)

	ECA_NEUTRALACTIONS(State)
			
	// --------------------------------------------------------------------------------------------------------------
	//								Pistol
	// --------------------------------------------------------------------------------------------------------------
	#define State Pistol
		// Stand
			#define Stance Stand
			class PistolStandActions:NoActionsBase
			{
				stop="PistolStand_loop";
				stopRelaxed="PistolStandRelaxed_loop";
				default = "PistolStand_loop";
				die="PistolStandDead";
				reloadMagazine="PistolStandReloadMagazine";
				RTMACTIONS_Basic(State,Stance)
				HandGunOff="PistolSafeStand";
				down="PistolLying";
				up="PistolCrouch";
				RTMACTIONS_Run(State,Stance)
				RTMACTIONS_StandSpeeds
				upDegree=ManPosHandGunStand;
			};
			RTMACTIONS_COMBATRUNACTIONS(State,Stance,Crouch)
			RTMACTIONS_BINOC(State,Stance,ManPosBinoc)
		// Crouch
			#define Stance Crouch
			class PistolCrouchActions:PistolStandActions
			{
				stop="PistolCrouch_loop";
				stopRelaxed="PistolCrouchRelaxed_loop";
				default = "PistolCrouch_loop";
				die="PistolCrouchDead";
				reloadMagazine="PistolCrouchReloadMagazine";
				RTMACTIONS_Basic(State,Stance)
				HandGunOff="PistolSafeCrouch";
				down="PistolLying";
				up="PistolStand";
				RTMACTIONS_Run(State,Stance)
				RTMACTIONS_CrouchSpeeds
				upDegree=ManPosHandGunCrouch;
			};
			RTMACTIONS_COMBATRUNACTIONS(State,Stance,Stand)
			RTMACTIONS_BINOC(State,Stance,ManPosBinoc)
		// Lying
			#define Stance Lying
			class PistolLyingActions:PistolStandActions
			{
				stop="PistolLying_loop";
				stopRelaxed="PistolLyingRelaxed_loop";
				default = "PistolLying_loop";
				die="PistolLyingDead";
				reloadMagazine="PistolLyingReloadMagazine";
				RTMACTIONS_Basic(State,Stance)
				HandGunOff="PistolSafeCrouch";
				down="PistolStand";
				up="PistolCrouch";
				RTMACTIONS_Crawl(State)
				RTMACTIONS_LyingSpeeds
				upDegree=ManPosHandGunLying;
			};
			RTMACTIONS_BINOC(State,Stance,ManPosBinocLying)

	ECA_NEUTRALACTIONS(State)
	
	// --------------------------------------------------------------------------------------------------------------
	//								PistolSafe
	// --------------------------------------------------------------------------------------------------------------
	#define State PistolSafe
		// Stand
			#define Stance Stand
			class PistolSafeStandActions:NoActionsBase
			{
				stop="PistolSafeStand1_loop";
				default = "PistolSafeStand1_loop";
				die="PistolSafeStandDead";
				RTMACTIONS_Basic(State,Stance)
				HandGunOn="PistolStand";
				down="PistolSafeLying";
				up="PistolSafeCrouch";
				fireNotPossible="PistolStand";
				RTMACTIONS_SafeRun(State,Stance)
				RTMACTIONS_SafeStandSpeeds
				upDegree=ManPosStand;
			};
			RTMACTIONS_DefaultVar(State,Stand,1);
			RTMACTIONS_SAFERUNACTIONS(State,Stance,Stand)
			RTMACTIONS_BINOC(State,Stance,ManPosBinocStand)
		// Crouch
			#define Stance Crouch
			class PistolSafeCrouchActions:PistolSafeStandActions
			{
				stop="PistolSafeCrouch_loop";
				default = "PistolSafeCrouch_loop";
				die="PistolSafeCrouchDead";
				RTMACTIONS_Basic(State,Stance)
				HandGunOn="PistolCrouch";
				up="PistolSafeStand";
				fireNotPossible="PistolCrouch";
				RTMACTIONS_SafeRun(State,Stand)
				RTMACTIONS_SafeCrouchSpeeds
				upDegree=ManPosStand;
			};
			RTMACTIONS_BINOC(State,Stance,ManPosBinocStand)
		// Lying
			class PistolSafeLyingActions:PistolSafeStandActions{}; // dummy action used by neutral class
			
	ECA_NEUTRALACTIONS(State)
			
	// --------------------------------------------------------------------------------------------------------------
	//								Rifle
	// --------------------------------------------------------------------------------------------------------------
	#define State Rifle
		// Stand
			#define Stance Stand
			class RifleStandActions:NoActionsBase
			{
				stop="RifleStand_loop";
				stopRelaxed="RifleStandRelaxed";
				default = "RifleStand_loop";
				die="RifleStandDead";
				reloadMagazine="RifleStandReloadMagazine";
				reloadMGun="RifleStandReloadMGun";
				reloadMortar="RifleStandReloadMortarStart";
				Salute="RifleStandReloadBolt";
				RTMACTIONS_Basic(State,Stance)
				HandGunOn="RiflePistolStand";
				Stand="RifleSafeStand";
				down="RifleLying";
				up="RifleCrouch";
				RTMACTIONS_Run(State,Stance)
				RTMACTIONS_StandSpeeds
				upDegree=ManPosCombat;
			};
			RTMACTIONS_RelaxedVar(State,Stand,1)
			RTMACTIONS_RelaxedVar(State,Stand,2)
			RTMACTIONS_RelaxedVar(State,Stand,3)
			RTMACTIONS_COMBATRUNACTIONS(State,Stance,Crouch)
			RTMACTIONS_COMBATRUNVARACTIONS(State,Stance,1)
			RTMACTIONS_COMBATRUNVARACTIONS(State,Stance,2)
			RTMACTIONS_COMBATRUNVARACTIONS(State,Stance,3)
			RTMACTIONS_COMBATRUNVARACTIONS(State,Stance,4)
			RTMACTIONS_COMBATRUNVARACTIONS(State,Stance,5)
			RTMACTIONS_COMBATWALKVARACTIONS(State,Stance,1)
			RTMACTIONS_COMBATWALKVARACTIONS(State,Stance,2)
			RTMACTIONS_COMBATWALKVARACTIONS(State,Stance,3)
			RTMACTIONS_COMBATWALKVARACTIONS(State,Stance,4)
			RTMACTIONS_BINOC(State,Stance,ManPosBinoc)
		// Crouch
			#define Stance Crouch
			class RifleCrouchActions:RifleStandActions
			{
				stop="RifleCrouch_loop";
				stopRelaxed="RifleCrouchRelaxed_loop";
				default = "RifleCrouch_loop";
				die="RifleCrouchDead";
				reloadMagazine="RifleCrouchReloadMagazine";
				reloadMGun="RifleCrouchReloadMGun";
				reloadMortar="RifleCrouchReloadMortarStart";
				Salute="RifleCrouchReloadBolt";
				RTMACTIONS_Basic(State,Stance)
				Stand="RifleSafeCrouch";
				HandGunOn="RiflePistolCrouch";
				up="RifleStand";
				RTMACTIONS_Run(State,Stance)
				RTMACTIONS_CrouchSpeeds
				upDegree=ManPosCrouch;
			};
			RTMACTIONS_COMBATRUNACTIONS(State,Stance,Stand)
			RTMACTIONS_BINOC(State,Stance,ManPosBinoc)
		// Lying
			#define Stance Lying
			class RifleLyingActions:RifleStandActions
			{
				stop="RifleLying_loop";
				stopRelaxed="RifleLyingRelaxed_loop";
				default = "RifleLying_loop";
				die="RifleLyingDead";
				reloadMagazine="RifleLyingReloadMagazine";
				reloadMGun="RifleLyingReloadMGun";
				reloadMortar="RifleLyingReloadMortarStart";
				Salute="RifleLyingReloadBolt";
				RTMACTIONS_Basic(State,Stance)
				Stand="RifleSafeCrouch";
				HandGunOn="RiflePistolLying";
				down="RifleStand";
				up="RifleCrouch";
				RTMACTIONS_Crawl(State)
				RTMACTIONS_LyingSpeeds
				upDegree=ManPosLying;
			};
			RTMACTIONS_BINOC(State,Stance,ManPosBinocLying)
	
	ECA_NEUTRALACTIONS(State)
	
	// --------------------------------------------------------------------------------------------------------------
	//								RiflePistol
	// --------------------------------------------------------------------------------------------------------------
	#define State RiflePistol
		// Stand
			#define Stance Stand
			class RiflePistolStandActions:NoActionsBase
			{
				stop="RiflePistolStand_loop";
				default = "RiflePistolStand";
				stopRelaxed="RiflePistolStandRelaxed";
				die="RiflePistolStandDead";
				reloadMagazine="RiflePistolStandReloadMagazine";
				RTMACTIONS_Basic(State,Stance)
				HandGunOff="RifleSafeStand";
				down="RiflePistolLying";
				up="RiflePistolCrouch";
				RTMACTIONS_Run(State,Stance)
				RTMACTIONS_StandSpeeds
				upDegree=ManPosHandGunStand;
			};
			RTMACTIONS_RelaxedVar(State,Stand,1);
			RTMACTIONS_COMBATRUNACTIONS(State,Stance,Crouch)
			RTMACTIONS_BINOC(State,Stance,ManPosBinoc)
		// Crouch
			#define Stance Crouch
			class RiflePistolCrouchActions:RiflePistolStandActions
			{
				stop="RiflePistolCrouch_loop";
				stopRelaxed="RiflePistolCrouchRelaxed_loop";
				default = "RiflePistolCrouch";
				die="RiflePistolCrouchDead";
				reloadMagazine="RiflePistolCrouchReloadMagazine";
				RTMACTIONS_Basic(State,Stance)
				HandGunOff="RifleSafeCrouch";
				down="RiflePistolLying";
				up="RiflePistolStand";
				RTMACTIONS_Run(State,Stance)
				RTMACTIONS_CrouchSpeeds
				upDegree=ManPosHandGunCrouch;
			};
			RTMACTIONS_COMBATRUNACTIONS(State,Stance,Stand)
			RTMACTIONS_BINOC(State,Stance,ManPosBinoc)
		// Lying
			#define Stance Lying
			class RiflePistolLyingActions:RiflePistolStandActions
			{
				stop="RiflePistolLying_loop";
				stopRelaxed="RiflePistolLyingRelaxed_loop";
				default = "RiflePistolLying";
				die="RiflePistolLyingDead";
				reloadMagazine="RiflePistolLyingReloadMagazine";
				RTMACTIONS_Basic(State,Stance)
				HandGunOff="RifleSafeCrouch";
				down="RiflePistolStand";
				up="RiflePistolCrouch";
				RTMACTIONS_Crawl(State)
				RTMACTIONS_LyingSpeeds
				upDegree=ManPosHandGunLying;
			};
			RTMACTIONS_BINOC(State,Stance,ManPosBinocLying)
	
	ECA_NEUTRALACTIONS(State)
	
	// --------------------------------------------------------------------------------------------------------------
	//								RifleSafe
	// --------------------------------------------------------------------------------------------------------------
	#define State RifleSafe
		// Stand
			#define Stance Stand
			class RifleSafeStandActions:NoActionsBase
			{
				stop="RifleSafeStand";
				default = "RifleSafeStand";
				die="RifleSafeStandDead";
				RTMACTIONS_Basic(State,Stance)
				Lying="RifleLying";
				HandGunOn="RiflePistolStand";
				down="RifleSafeCrouch"; // was "RifleLying"
				up="RifleSafeCrouch";
				fireNotPossible="RifleStand";
				RTMACTIONS_SafeRun(State,Stance)
				RTMACTIONS_SafeStandSpeeds
				upDegree=ManPosStand;
			};
			RTMACTIONS_DefaultVar(State,Stand,1)
			RTMACTIONS_DefaultVar(State,Stand,2)
			RTMACTIONS_DefaultVar(State,Stand,3)
			RTMACTIONS_SAFERUNACTIONS(State,Stance,Stand)
			RTMACTIONS_SAFERUNVARACTIONS(State,Stance,1)
			RTMACTIONS_SAFERUNVARACTIONS(State,Stance,2)
			RTMACTIONS_SAFERUNVARACTIONS(State,Stance,3)
			RTMACTIONS_SAFERUNVARACTIONS(State,Stance,4)
			RTMACTIONS_SAFERUNVARACTIONS(State,Stance,5)
			RTMACTIONS_BINOC(State,Stance,ManPosBinocStand)
		// Crouch
			#define Stance Crouch
			class RifleSafeCrouchActions:RifleSafeStandActions
			{
				stop="RifleSafeCrouch_loop";
				default = "RifleSafeCrouch_loop";
				die="RifleSafeCrouchDead";
				RTMACTIONS_Basic(State,Stance)
				HandGunOn="RiflePistolCrouch";
				down="RifleSafeStand"; // was "RifleLying"
				up="RifleSafeStand";
				fireNotPossible="RifleCrouch";
				RTMACTIONS_SafeRun(State,Stand)
				RTMACTIONS_SafeCrouchSpeeds
				upDegree=ManPosStand;
			};
			RTMACTIONS_BINOC(State,Stance,ManPosBinocStand)
		// Lying
			class RifleSafeLyingActions:RifleSafeStandActions{}; // dummy action used by neutral class
	
	ECA_NEUTRALACTIONS(State)