diff --git a/addons/medical_ai/XEH_postInit.sqf b/addons/medical_ai/XEH_postInit.sqf index 2b9d15d3e82..982094e74de 100644 --- a/addons/medical_ai/XEH_postInit.sqf +++ b/addons/medical_ai/XEH_postInit.sqf @@ -6,6 +6,13 @@ if (GVAR(enabledFor) == 0 || {!(GETEGVAR(medical,enabled,false))}) exitWith {}; // 0: disabled if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients + // default time values for AI being ready to heal, used in fnc_isSafe + if (isNil QGVAR(timeSafe_shoot)) then { GVAR(timeSafe_shoot) = 30; }; + if (isNil QGVAR(timeSafe_hit)) then { GVAR(timeSafe_hit) = 30; }; + if (isNil QGVAR(timeSafe_suppressed)) then { GVAR(timeSafe_suppressed) = 30; }; + + GVAR(itemHash) = uiNamespace getVariable QGVAR(itemHash); + ["ace_firedNonPlayer", { _unit setVariable [QGVAR(lastFired), CBA_missionTime]; }] call CBA_fnc_addEventHandler; diff --git a/addons/medical_ai/XEH_preInit.sqf b/addons/medical_ai/XEH_preInit.sqf index 8cdc2ee6ad8..894773534a4 100644 --- a/addons/medical_ai/XEH_preInit.sqf +++ b/addons/medical_ai/XEH_preInit.sqf @@ -8,11 +8,4 @@ PREP_RECOMPILE_END; #include "initSettings.inc.sqf" -// default time values for AI being ready to heal, used in fnc_isSafe -if (isNil QGVAR(timeSafe_shoot)) then { GVAR(timeSafe_shoot) = 30; }; -if (isNil QGVAR(timeSafe_hit)) then { GVAR(timeSafe_hit) = 30; }; -if (isNil QGVAR(timeSafe_suppressed)) then { GVAR(timeSafe_suppressed) = 30; }; - -GVAR(itemHash) = uiNamespace getVariable QGVAR(itemHash); - ADDON = true; diff --git a/addons/medical_treatment/CfgVehicles.hpp b/addons/medical_treatment/CfgVehicles.hpp index 4f922eb1996..4d296d07c85 100644 --- a/addons/medical_treatment/CfgVehicles.hpp +++ b/addons/medical_treatment/CfgVehicles.hpp @@ -31,7 +31,7 @@ class CfgVehicles { selection = ""; class GVAR(buryBodyBag) { displayName = CSTRING(DigGrave); - condition = QUOTE([ARR_2(_this#1,_this#0)] call FUNC(canDigGrave)); + condition = QUOTE(GETEGVAR(medical,enabled,false) && {[ARR_2(_this#1,_this#0)] call FUNC(canDigGrave)}); statement = QUOTE(_this call FUNC(placeBodyBagInGrave)); icon = QPATHTOEF(medical_gui,ui\grave.paa); }; diff --git a/addons/medical_vitals/initSettings.inc.sqf b/addons/medical_vitals/initSettings.inc.sqf index db762d2c522..513636eeca5 100644 --- a/addons/medical_vitals/initSettings.inc.sqf +++ b/addons/medical_vitals/initSettings.inc.sqf @@ -6,7 +6,7 @@ true, 1, { - if (_this) exitWith {}; // skip if true + if (_this || {!(GETEGVAR(medical,enabled,false))}) exitWith {}; // skip if true or if medical system disabled { _x setVariable [VAR_OXYGEN_DEMAND, 0, true]; _x setVariable [VAR_SPO2, DEFAULT_SPO2, true];