<commit_before>//////////////////////////////////////////////////////////////////
// Script File for [Arma 3] - detect_key_input.sqf
// Created by: <NAME>
// Modified by: AgentRev
//////////////////////////////////////////////////////////////////

#define HORDE_JUMPMF_SLOWING_MULTIPLIER 0.75

private ["_pressedKey", "_handled"];
_pressedKey = _this select 1;
_handled = false;

if (_pressedKey in actionKeys "GetOver") then
{
	if (horde_jumpmf_var_jumping) then
	{
		_handled = true;
	}
	else
	{
		if (vehicle player == player && {stance player == "STAND"} && {getFatigue player < 0.6} && {isTouchingGround player} && {[["Mrun","Meva"], animationState player] call fn_findString == 8}) then
		{
			horde_jumpmf_var_jumping = true;
			
			[] spawn
			{
				private ["_prevMove", "_prevVel", "_fatigue", "_load"];
				
				_prevMove = animationState player;
				_prevVel = velocity player;
				_fatigue = getFatigue player;
				_load = loadAbs player;
		
				player playMoveNow "AovrPercMrunSrasWrflDf";
				
				waitUntil
				{
					player setFatigue (_fatigue + 0.05 + (_load / 5000));
					player setVelocity
					[
						(_prevVel select 0) * HORDE_JUMPMF_SLOWING_MULTIPLIER, 
						(_prevVel select 1) * HORDE_JUMPMF_SLOWING_MULTIPLIER,
						(velocity player) select 2
					];
					(["AovrPercMrun", animationState player] call fn_findString == -1)
				};
				
				[player, _prevMove] call switchMoveGlobal;
				player setVelocity
				[
					_prevVel select 0,
					_prevVel select 1,
					(velocity player) select 2
				];
				
				sleep 0.5; // Cooldown
				
				horde_jumpmf_var_jumping = false;
			};<commit_msg>Fixed jumping not working properly (cherry picked from commit A3Wasteland/ArmA3_Wasteland.Altis@a280c2304fd88e038690ac5676117a8545202fa9)<commit_after>//////////////////////////////////////////////////////////////////
// Script File for [Arma 3] - detect_key_input.sqf
// Created by: <NAME>
// Modified by: AgentRev
//////////////////////////////////////////////////////////////////

#define HORDE_JUMPMF_SLOWING_MULTIPLIER 0.75

private ["_pressedKey", "_handled"];
_pressedKey = _this select 1;
_handled = false;

if (_pressedKey in actionKeys "GetOver") then
{
	if (horde_jumpmf_var_jumping) then
	{
		_handled = true;
	}
	else
	{
		if (vehicle player == player && {stance player == "STAND"} && {getFatigue player < 0.6} && {isTouchingGround player} && {[["Mrun","Meva"], animationState player] call fn_findString == 8}) then
		{
			horde_jumpmf_var_jumping = true;
			
			[] spawn
			{
				private ["_prevMove", "_prevVel", "_fatigue", "_load"];
				
				_prevMove = animationState player;
				_prevVel = velocity player;
				_fatigue = getFatigue player;
				_load = loadAbs player;
		
				[player, "AovrPercMrunSrasWrflDf"] call switchMoveGlobal;
				
				waitUntil
				{
					player setFatigue (_fatigue + 0.05 + (_load / 5000));
					player setVelocity
					[
						(_prevVel select 0) * HORDE_JUMPMF_SLOWING_MULTIPLIER, 
						(_prevVel select 1) * HORDE_JUMPMF_SLOWING_MULTIPLIER,
						(velocity player) select 2
					];
					(["AovrPercMrun", animationState player] call fn_findString == -1)
				};
				
				[player, _prevMove] call switchMoveGlobal;
				player setVelocity
				[
					_prevVel select 0,
					_prevVel select 1,
					(velocity player) select 2
				];
				
				sleep 0.5; // Cooldown
				
				horde_jumpmf_var_jumping = false;
			};
{'fraction_non_alphanumeric': 0.17864537119195503, 'fraction_numerical': 0.023661638568470866, 'mean_word_length': 2.3786213786213786, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6418650', 'n_tokens_mistral': 1452, 'n_tokens_neox': 1103, 'n_words': 264}