diff --git a/addons/advanced_fatigue/XEH_postInit.sqf b/addons/advanced_fatigue/XEH_postInit.sqf index d566e3b042..dd68a843c0 100644 --- a/addons/advanced_fatigue/XEH_postInit.sqf +++ b/addons/advanced_fatigue/XEH_postInit.sqf @@ -12,10 +12,11 @@ if (!hasInterface) exitWith {}; GVAR(ppeBlackout) ppEffectCommit 0.4; // - GVAR updating and initialization ----------------------------------------- - if !(isNull ACE_player) then { - [ACE_player, objNull] call FUNC(handlePlayerChanged); - }; - ["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; + ["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler; + ["visibleMap", { + private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; + _staminaBarContainer ctrlShow (!visibleMap); + }, true] call CBA_fnc_addPlayerEventHandler; // - Duty factors ------------------------------------------------------------- if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { diff --git a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf b/addons/advanced_fatigue/functions/fnc_mainLoop.sqf index f438d6ef08..ee8f33f5c7 100644 --- a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf +++ b/addons/advanced_fatigue/functions/fnc_mainLoop.sqf @@ -11,6 +11,9 @@ #include "script_component.hpp" if (!alive ACE_player) exitWith { // Dead people don't breath, Will also handle null (Map intros) [FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute; + private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; + _staminaBarContainer ctrlSetFade 1; + _staminaBarContainer ctrlCommit 1; }; private _currentWork = REE;