From b743a9be3168e2aad994cd0a4bd9081dc1462b51 Mon Sep 17 00:00:00 2001 From: He-Man Date: Fri, 19 Jan 2018 16:14:21 +0100 Subject: [PATCH] Small AutoRun fixes --- Sources/epoch_code/compile/EPOCH_AutoRun_Check.sqf | 3 +++ .../epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf | 2 ++ Sources/epoch_code/compile/setup/masterLoop/Event0.sqf | 7 +++---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Sources/epoch_code/compile/EPOCH_AutoRun_Check.sqf b/Sources/epoch_code/compile/EPOCH_AutoRun_Check.sqf index 73010d68..0e227fc2 100644 --- a/Sources/epoch_code/compile/EPOCH_AutoRun_Check.sqf +++ b/Sources/epoch_code/compile/EPOCH_AutoRun_Check.sqf @@ -19,6 +19,9 @@ private["_canAutoRun","_currentPos"]; _canAutoRun = true; +if !(alive player) exitwith { + false +}; if !(istouchingground player) exitwith { false }; diff --git a/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf b/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf index 59f8656f..7f15df40 100644 --- a/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf +++ b/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf @@ -62,6 +62,8 @@ EPOCH_buildMode = 0; EPOCH_snapDirection = 0; EPOCH_Target = objNull; +EPOCH_IsAutoRunning = false; + // playerKilledScreen _playerKilledScreen = getText(_config >> "playerKilledScreen"); if (_playerKilledScreen isEqualTo "") then {_playerKilledScreen = "TapOut2"}; diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event0.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event0.sqf index bde43f25..65e89ec4 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event0.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event0.sqf @@ -2,11 +2,10 @@ if (EPOCH_IsAutoRunning) then { if (call EPOCH_AutoRun_Check) then { - call EPOCH_AutoRun + call EPOCH_AutoRun; } else { - EPOCH_IsAutoRunning = false; - player switchMove ""; - ["Autorun stopped",5] call Epoch_Message; + EPOCH_IsAutoRunning = false; + player switchMove ""; }; }; \ No newline at end of file