diff --git a/addons/medical/functions/fnc_addDamageToUnit.sqf b/addons/medical/functions/fnc_addDamageToUnit.sqf index 4fc8afac9a..bf7f9deedd 100644 --- a/addons/medical/functions/fnc_addDamageToUnit.sqf +++ b/addons/medical/functions/fnc_addDamageToUnit.sqf @@ -40,14 +40,14 @@ if (!isNull _instigator) then { }; #ifdef DEBUG_TESTRESULTS -private _startDmg = +(_unit getVariable [QGVAR(bodyPartDamage), [-1]]); +private _startDmg = +(_unit getVariable [QGVAR(medical,bodyPartDamage), [-1]]); private _startPain = GET_PAIN(_unit); #endif -[QEGVAR(medical_engine,woundReceived), [_unit, _bodyPart, _damageToAdd, _instigator, _typeOfDamage]] call CBA_fnc_localEvent; +[QEGVAR(medical,woundReceived), [_unit, _bodyPart, _damageToAdd, _instigator, _typeOfDamage]] call CBA_fnc_localEvent; #ifdef DEBUG_TESTRESULTS -private _endDmg = _unit getVariable [QGVAR(bodyPartDamage), [-1]]; +private _endDmg = _unit getVariable [QGVAR(medical,bodyPartDamage), [-1]]; private _endPain = GET_PAIN(_unit); private _typeOfDamageAdj = _typeOfDamage call EFUNC(medical_damage,getTypeOfDamage); private _config = configFile >> "ACE_Medical_Injuries" >> "damageTypes" >> _typeOfDamageAdj; diff --git a/addons/medical/functions/fnc_dev_watchMedicalStats.sqf b/addons/medical/functions/fnc_dev_watchMedicalStats.sqf index 3a7bb4e47c..30335eb1b0 100644 --- a/addons/medical/functions/fnc_dev_watchMedicalStats.sqf +++ b/addons/medical/functions/fnc_dev_watchMedicalStats.sqf @@ -63,7 +63,7 @@ // Damage: private _damage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]]; - private _limping = if (_unit getVariable [QEGVAR(medical_engine,isLimping), false]) then {"[ Limping ]"} else {""}; + private _limping = if (_unit getVariable [QEGVAR(medical,isLimping), false]) then {"[ Limping ]"} else {""}; _return pushBack format ["Damage: [H: %1] [B: %2] %3", (_damage select 0) toFixed 2, (_damage select 1) toFixed 2, _limping]; _return pushBack format ["[LA:%1] [RA: %2] [LL:%3] [RL: %4]", (_damage select 2) toFixed 2, (_damage select 3) toFixed 2, (_damage select 4) toFixed 2, (_damage select 5) toFixed 2]; diff --git a/addons/medical/functions/fnc_unconsciousPFH.sqf b/addons/medical/functions/fnc_unconsciousPFH.sqf deleted file mode 100644 index 64ff336b66..0000000000 --- a/addons/medical/functions/fnc_unconsciousPFH.sqf +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Author: Glowbal - * PFH logic for unconscious state - * - * Arguments: - * 0: PFEH - - * 0: The unit that will be put in an unconscious state - * 1: unitPos (stance) - * 2: Starting Time - * 3: Minimum Waiting Time - * 4: Has Moved Out - * 5: Parachute Check - * 1: PFEH ID - * - * Return Value: - * None - * - * Example: - * [[unit,"pos", 5, 5, true, false], 5], "classname"] call ace_medical_fnc_unconsciousPFH - * - * Public: yes - */ - -#include "script_component.hpp" - -params ["_args", "_idPFH"]; -_args params ["_unit", "_originalPos", "_startingTime", "_minWaitingTime", "_hasMovedOut", "_parachuteCheck"]; - -TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _originalPos, _startingTime, _minWaitingTime, _hasMovedOut, _parachuteCheck); - -if (!alive _unit) exitWith { - if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then { - TRACE_1("Removing fake weapon [on death]",_unit); - _unit removeWeapon "ACE_FakePrimaryWeapon"; - }; - if (GVAR(moveUnitsFromGroupOnUnconscious)) then { - [_unit, false, VAR_UNCON, side group _unit] call EFUNC(common,switchToGroupSide); - }; - [_unit, "setHidden", "ace_unconscious", false] call EFUNC(common,statusEffect_set); - [_unit, false] call EFUNC(common,disableAI); - //_unit setUnitPos _originalPos; - - [_unit, "isUnconscious"] call EFUNC(common,unmuteUnit); - ["ace_unconscious", [_unit, false]] call CBA_fnc_globalEvent; - - TRACE_3("ACE_DEBUG_Unconscious_Exit",_unit, (!alive _unit) , "ace_unconscious"); - - [_idPFH] call CBA_fnc_removePerFrameHandler; -}; - -// In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation -if !IS_UNCONSCIOUS(_unit) exitWith { - TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call EFUNC(medical_status,isBeingCarried), [_unit] call EFUNC(medical_status,isBeingDragged), _idPFH, _unit getVariable QGVAR(unconsciousArguments),animationState _unit); - // TODO, handle this with carry instead, so we can remove the PFH here. - // Wait until the unit isn't being carried anymore, so we won't end up with wierd animations - if !(([_unit] call EFUNC(medical_status,isBeingCarried)) || ([_unit] call EFUNC(medical_status,isBeingDragged))) then { - if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then { - TRACE_1("Removing fake weapon [on wakeup]",_unit); - _unit removeWeapon "ACE_FakePrimaryWeapon"; - }; - - if (vehicle _unit == _unit) then { - if (animationState _unit == "AinjPpneMstpSnonWrflDnon") then { - [_unit,"AinjPpneMstpSnonWrflDnon_rolltofront", 2] call EFUNC(common,doAnimation); - [_unit,"amovppnemstpsnonwnondnon", 1] call EFUNC(common,doAnimation); - } else { - [_unit,"amovppnemstpsnonwnondnon", 2] call EFUNC(common,doAnimation); - }; - } else { - private _vehicle = vehicle _unit; - private _oldVehicleAnimation = _unit getVariable [QGVAR(vehicleAwakeAnim), []]; - private _awakeInVehicleAnimation = ""; - if (((count _oldVehicleAnimation) > 0) && {(_oldVehicleAnimation select 0) == _vehicle}) then { - _awakeInVehicleAnimation = _oldVehicleAnimation select 1; - }; - //Make sure we have a valid, non-terminal animation: - if ((_awakeInVehicleAnimation != "") && {(getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> _awakeInVehicleAnimation >> "terminal")) == 0}) then { - [_unit, _awakeInVehicleAnimation, 2] call EFUNC(common,doAnimation); - } else { - //Don't have a valid animation saved, reset the unit animation with a moveInXXX - TRACE_1("No Valid Animation, doing seat reset", _awakeInVehicleAnimation); - private _slotInfo = []; - {if ((_x select 0) == _unit) exitWith {_slotInfo = _x;};} forEach (fullCrew _vehicle); - if (_slotInfo isEqualTo []) exitWith {ERROR("No _slotInfo?");}; - //Move the unit out: - _unit setPosASL ((getPosASL _unit) vectorAdd [0,0,100]); - //Move the unit back into old seat: - if ((_slotInfo select 1) == "driver") then { - _unit moveInDriver _vehicle; - } else { - if ((_slotInfo select 1) == "cargo") then { - _unit moveInCargo [_vehicle, (_slotInfo select 2)]; - } else { - _unit moveInTurret [_vehicle, (_slotInfo select 3)]; - }; - }; - }; - }; - _unit setVariable [QGVAR(vehicleAwakeAnim), nil]; - - ["ace_unconscious", [_unit, false]] call CBA_fnc_globalEvent; - // EXIT PFH - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - if (!_hasMovedOut) then { - // Reset the unit back to the previous captive state. - [_unit, "setHidden", "ace_unconscious", false] call EFUNC(common,statusEffect_set); - - // Swhich the unit back to its original group - //Unconscious units shouldn't be put in another group #527: - if (GVAR(moveUnitsFromGroupOnUnconscious)) then { - [_unit, false, VAR_UNCON, side group _unit] call EFUNC(common,switchToGroupSide); - }; - [_unit, false] call EFUNC(common,disableAI); - _unit setUnitPos _originalPos; // This is not position but stance (DOWN, MIDDLE, UP) - - _unit setUnconscious false; - - [_unit, "isUnconscious"] call EFUNC(common,unmuteUnit); - - // ensure this statement runs only once - _args set [4, true]; - }; -}; - -if (_parachuteCheck) then { - if !(vehicle _unit isKindOf "ParachuteBase") then { - [_unit, [_unit] call EFUNC(common,getDeathAnim), 1, true] call EFUNC(common,doAnimation); - _args set [5, false]; - }; -}; - -if (!local _unit) exitWith { - TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getVariable QGVAR(unconsciousArguments)); - _args set [3, _minWaitingTime - (CBA_missionTime - _startingTime)]; - _unit setVariable [QGVAR(unconsciousArguments), _args, true]; - [_idPFH] call CBA_fnc_removePerFrameHandler; -}; - -// Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs -if ((CBA_missionTime - _startingTime) >= _minWaitingTime) exitWith { - TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition)); - if (!([_unit] call FUNC(getUnconsciousCondition))) then { - _unit setVariable [VAR_UNCON, false, true]; - }; -}; diff --git a/addons/medical_blood/XEH_postInit.sqf b/addons/medical_blood/XEH_postInit.sqf index 78bf5c43f9..1bb563fb15 100644 --- a/addons/medical_blood/XEH_postInit.sqf +++ b/addons/medical_blood/XEH_postInit.sqf @@ -38,5 +38,5 @@ if (isServer) then { private _stateMachine = [_listcode, true] call CBA_statemachine_fnc_create; [_stateMachine, {call FUNC(onBleeding)}, {}, {}, "Bleeding"] call CBA_statemachine_fnc_addState; - [QEGVAR(medical_engine,woundReceived), FUNC(handleWoundReceived)] call CBA_fnc_addEventHandler; + [QEGVAR(medical,woundReceived), FUNC(handleWoundReceived)] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/medical_damage/XEH_preInit.sqf b/addons/medical_damage/XEH_preInit.sqf index c2a5055e76..4d07495808 100644 --- a/addons/medical_damage/XEH_preInit.sqf +++ b/addons/medical_damage/XEH_preInit.sqf @@ -14,20 +14,19 @@ addMissionEventHandler ["Loaded",{ call FUNC(parseConfigForInjuries); }]; -// decide which woundsHandler to use by whether the extension is present or not +// decide which woundsHandler to use by whether the extension is present or not if ("ace_medical" callExtension "version" != "") then { DFUNC(woundsHandlerActive) = LINKFUNC(woundsHandler); } else { DFUNC(woundsHandlerActive) = LINKFUNC(woundsHandlerSQF); }; -[QEGVAR(medical_engine,woundReceived), { +[QEGVAR(medical,woundReceived), { params ["_unit", "_woundedHitPoint", "_receivedDamage", "", "_ammo"]; private _typeOfDamage = _ammo call FUNC(getTypeOfDamage); [_unit, _woundedHitPoint, _receivedDamage, _typeOfDamage] call FUNC(woundsHandlerActive); - // Disable for now: // [_unit, EGVAR(medical,STATE_MACHINE)] call EFUNC(medical,addStateHandler); }] call CBA_fnc_addEventHandler; diff --git a/addons/medical_damage/functions/fnc_woundsHandler.sqf b/addons/medical_damage/functions/fnc_woundsHandler.sqf index f6e455cf91..95b2b3393d 100644 --- a/addons/medical_damage/functions/fnc_woundsHandler.sqf +++ b/addons/medical_damage/functions/fnc_woundsHandler.sqf @@ -24,7 +24,7 @@ if (_typeOfDamage isEqualTo "") then { // Administration for open wounds and ids private _openWounds = _unit getVariable [QEGVAR(medical,openWounds), []]; -private _woundID = _unit getVariable [QGVAR(lastUniqueWoundID), 1]; // Unique wound ids are not used anywhere: ToDo Remove from openWounds array +private _woundID = _unit getVariable [QEGVAR(medical,lastUniqueWoundID), 1]; // Unique wound ids are not used anywhere: ToDo Remove from openWounds array TRACE_4("extension call",_bodyPart,_damage,_typeOfDamage,_woundID); private _extensionOutput = "ace_medical" callExtension format ["HandleDamageWounds,%1,%2,%3,%4", _bodyPart, _damage, _typeOfDamage, _woundID]; diff --git a/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf b/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf index 10377411ed..87985af16b 100644 --- a/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf +++ b/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf @@ -69,7 +69,7 @@ if (_highestPossibleSpot < 0) exitWith {}; // Administration for open wounds and ids private _openWounds = _unit getVariable [QEGVAR(medical,openWounds), []]; -private _woundID = _unit getVariable [QGVAR(lastUniqueWoundID), 1]; // Unique wound ids are not used anywhere: ToDo Remove from openWounds array +private _woundID = _unit getVariable [QEGVAR(medical,lastUniqueWoundID), 1]; // Unique wound ids are not used anywhere: ToDo Remove from openWounds array private _painLevel = 0; private _critialDamage = false; diff --git a/addons/medical_engine/XEH_postInit.sqf b/addons/medical_engine/XEH_postInit.sqf index 7382eef0df..f0d4bcd26c 100644 --- a/addons/medical_engine/XEH_postInit.sqf +++ b/addons/medical_engine/XEH_postInit.sqf @@ -21,7 +21,7 @@ }, nil, nil, true] call CBA_fnc_addClassEventHandler; #ifdef DEBUG_MODE_FULL -[QGVAR(woundReceived), { +[QEGVAR(medical,woundReceived), { params ["_unit", "_woundedHitPoint", "_receivedDamage", "_shooter", "_ammo"]; TRACE_5("wound",_unit,_woundedHitPoint, _receivedDamage, _shooter, _ammo); //systemChat str _this; diff --git a/addons/medical_engine/functions/fnc_damageBodyPart.sqf b/addons/medical_engine/functions/fnc_damageBodyPart.sqf index a1d9b4ba30..1215fdc1cd 100644 --- a/addons/medical_engine/functions/fnc_damageBodyPart.sqf +++ b/addons/medical_engine/functions/fnc_damageBodyPart.sqf @@ -39,6 +39,6 @@ switch (toLower _selection) do { _unit setHitPointDamage ["HitHands", _damage]; }; case ("legs"): { - _unit setHitPointDamage ["HitLegs", _damage + ([0, LIMPING_MIN_DAMAGE] select (_unit getVariable [QGVAR(isLimping), false]))]; + _unit setHitPointDamage ["HitLegs", _damage + ([0, LIMPING_MIN_DAMAGE] select (_unit getVariable [QEGVAR(medical,isLimping), false]))]; }; }; diff --git a/addons/medical_engine/functions/fnc_handleDamage.sqf b/addons/medical_engine/functions/fnc_handleDamage.sqf index 1e00d07fdf..486883b374 100644 --- a/addons/medical_engine/functions/fnc_handleDamage.sqf +++ b/addons/medical_engine/functions/fnc_handleDamage.sqf @@ -138,7 +138,7 @@ if (_hitPoint isEqualTo "ace_hdbracket") exitWith { // Don't trigger for minor damage. if (_receivedDamage > 1E-3) then { - [QGVAR(woundReceived), [_unit, _woundedHitPoint, _receivedDamage, _shooter, _ammo]] call CBA_fnc_localEvent; + [QEGVAR(medical,(woundReceived), [_unit, _woundedHitPoint, _receivedDamage, _shooter, _ammo]] call CBA_fnc_localEvent; }; 0 @@ -147,14 +147,14 @@ if (_hitPoint isEqualTo "ace_hdbracket") exitWith { // Check for drowning damage. // Don't change the third expression. Safe method for FLOATs. if (_hitPoint isEqualTo "#structural" && {getOxygenRemaining _unit <= 0.5} && {_damage isEqualTo (_oldDamage + 0.005)}) exitWith { - [QGVAR(woundReceived), [_unit, "Body", _newDamage, _unit, "#drowning"]] call CBA_fnc_localEvent; + [QEGVAR(medical,woundReceived), [_unit, "Body", _newDamage, _unit, "#drowning"]] call CBA_fnc_localEvent; 0 }; // Handle vehicle crashes if (_isCrash) exitWith { - [QGVAR(woundReceived), [_unit, "Body", _newDamage, _unit, "#vehiclecrash"]] call CBA_fnc_localEvent; + [QEGVAR(medical,woundReceived), [_unit, "Body", _newDamage, _unit, "#vehiclecrash"]] call CBA_fnc_localEvent; 0 }; diff --git a/addons/medical_engine/functions/fnc_setLimping.sqf b/addons/medical_engine/functions/fnc_setLimping.sqf index 2e507953ed..14ce200b55 100644 --- a/addons/medical_engine/functions/fnc_setLimping.sqf +++ b/addons/medical_engine/functions/fnc_setLimping.sqf @@ -22,7 +22,7 @@ if (!local _unit) exitWith { ERROR("Unit not local or null"); }; -_unit setVariable [QGVAR(isLimping), _isLimping, true]; +_unit setVariable [QEGVAR(medical,isLimping), _isLimping, true]; // refresh private _isDamaged = _unit getHitPointDamage "HitLegs" >= DAMAGED_MIN_THRESHOLD && {_unit getHitPointDamage "HitLegs" != LIMPING_MIN_DAMAGE}; diff --git a/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf b/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf index 852f5ec845..6a22b9fdcd 100644 --- a/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf +++ b/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf @@ -24,10 +24,10 @@ if (_painLevel > 0) then { // Handle spontaneous wakeup from unconsciousness if (EGVAR(medical,spontaneousWakeUpChance) > 0) then { if (_unit call EFUNC(medical_status,hasStableVitals)) then { - private _lastWakeUpCheck = _unit getVariable [QGVAR(lastWakeUpCheck), CBA_missionTime]; + private _lastWakeUpCheck = _unit getVariable [EQGVAR(medical,lastWakeUpCheck), CBA_missionTime]; if (CBA_missionTime - _lastWakeUpCheck > SPONTANEOUS_WAKE_UP_INTERVAL) then { TRACE_2("Checking for wake up",_unit,EGVAR(medical,spontaneousWakeUpChance)); - _unit setVariable [QGVAR(lastWakeUpCheck), CBA_missionTime]; + _unit setVariable [EQGVAR(medical,lastWakeUpCheck), CBA_missionTime]; if ((random 1) < EGVAR(medical,spontaneousWakeUpChance)) then { TRACE_1("Spontaneous wake up!",_unit); [QEGVAR(medical,WakeUp), _unit] call CBA_fnc_localEvent; @@ -35,6 +35,6 @@ if (EGVAR(medical,spontaneousWakeUpChance) > 0) then { }; } else { // Unstable vitals, procrastinate the next wakeup check - _unit setVariable [QGVAR(lastWakeUpCheck), CBA_missionTime]; + _unit setVariable [EQGVAR(medical,lastWakeUpCheck), CBA_missionTime]; }; }; diff --git a/addons/medical_statemachine/functions/fnc_leftStateCardiacArrest.sqf b/addons/medical_statemachine/functions/fnc_leftStateCardiacArrest.sqf index a88ad1b3d1..de1ae289e5 100644 --- a/addons/medical_statemachine/functions/fnc_leftStateCardiacArrest.sqf +++ b/addons/medical_statemachine/functions/fnc_leftStateCardiacArrest.sqf @@ -15,6 +15,6 @@ params ["_unit"]; _unit setVariable [VAR_CRDC_ARRST, false, true]; -_unit setVariable [QGVAR(cardiacArrestStart), nil]; +_unit setVariable [QEGVAR(medical,cardiacArrestStart), nil]; _unit setVariable [VAR_HEART_RATE, 40, true]; _unit setVariable [QGVAR(lastTimeUpdated), CBA_missionTime]; diff --git a/addons/medical_statemachine/functions/fnc_transitionSecondChance.sqf b/addons/medical_statemachine/functions/fnc_transitionSecondChance.sqf index 6fcfd0ac08..1a70c08911 100644 --- a/addons/medical_statemachine/functions/fnc_transitionSecondChance.sqf +++ b/addons/medical_statemachine/functions/fnc_transitionSecondChance.sqf @@ -13,7 +13,7 @@ #include "script_component.hpp" params ["_unit"]; -_unit setVariable [QGVAR(deathBlocked), true]; +_unit setVariable [QEGVAR(medical,deathBlocked), true]; [{ - _this setVariable [QGVAR(deathBlocked), false]; + _this setVariable [QEGVAR(medical,deathBlocked), false]; }, _unit, 1] call CBA_fnc_waitAndExecute; diff --git a/addons/medical_status/functions/fnc_initUnit.sqf b/addons/medical_status/functions/fnc_initUnit.sqf index 92ddbf12e1..76f243f699 100644 --- a/addons/medical_status/functions/fnc_initUnit.sqf +++ b/addons/medical_status/functions/fnc_initUnit.sqf @@ -42,7 +42,7 @@ _unit setVariable [VAR_PAIN_SUPP_ADJ, [], true]; _unit setVariable [QEGVAR(medical,openWounds), [], true]; _unit setVariable [QEGVAR(medical,bandagedWounds), [], true]; _unit setVariable [QEGVAR(medical,stitchedWounds), [], true]; -_unit setVariable [QEGVAR(medical_engine,isLimping), false, true]; +_unit setVariable [QEGVAR(medical,isLimping), false, true]; // - Misc --------------------------------------------------------------------- _unit setVariable [VAR_UNCON, false, true]; diff --git a/addons/medical_status/functions/fnc_setUnconscious.sqf b/addons/medical_status/functions/fnc_setUnconscious.sqf index c87d3fd1c8..6965ef3ea8 100644 --- a/addons/medical_status/functions/fnc_setUnconscious.sqf +++ b/addons/medical_status/functions/fnc_setUnconscious.sqf @@ -34,7 +34,7 @@ if ((isNull _unit) || {!alive _unit} || {!(_unit isKindOf "CAManBase")}) exitWit false }; if (!local _unit) exitWith { - [QGVAR(setUnconscious), [_unit, _knockOut], _unit] call CBA_fnc_targetEvent; + [QEGVAR(medical,setUnconscious), [_unit, _knockOut], _unit] call CBA_fnc_targetEvent; true }; if (_knockOut isEqualTo IS_UNCONSCIOUS(_unit)) exitWith { @@ -42,7 +42,7 @@ if (_knockOut isEqualTo IS_UNCONSCIOUS(_unit)) exitWith { false }; -private _beforeState = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; +private _beforeState = [_unit, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; if (_knockOut) then { @@ -60,7 +60,7 @@ if (_knockOut) then { }, [_unit], _minWaitingTime] call CBA_fnc_waitAndExecute; }; if (EGVAR(medical,spontaneousWakeUpChance) > 0) then { - _unit setVariable [QGVAR(lastWakeUpCheck), CBA_missionTime + _minWaitingTime - SPONTANEOUS_WAKE_UP_INTERVAL]; + _unit setVariable [QEGVAR(medical, lastWakeUpCheck), CBA_missionTime + _minWaitingTime - SPONTANEOUS_WAKE_UP_INTERVAL]; }; }; @@ -69,7 +69,7 @@ if (_knockOut) then { [QGVAR(WakeUp), _unit] call CBA_fnc_localEvent; }; -private _afterState = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; +private _afterState = [_unit, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; TRACE_2("state change",_beforeState,_afterState); true diff --git a/addons/medical_treatment/functions/fnc_treatmentFullHealLocal.sqf b/addons/medical_treatment/functions/fnc_treatmentFullHealLocal.sqf index 4fe65dc8bf..db27d446a8 100644 --- a/addons/medical_treatment/functions/fnc_treatmentFullHealLocal.sqf +++ b/addons/medical_treatment/functions/fnc_treatmentFullHealLocal.sqf @@ -28,7 +28,7 @@ _target setVariable [QGVAR(occludedMedications), nil, true]; _target setVariable [QEGVAR(medical,openWounds), [], true]; _target setVariable [QEGVAR(medical,bandagedWounds), [], true]; _target setVariable [QEGVAR(medical,stitchedWounds), [], true]; -_target setVariable [QEGVAR(medical_engine,isLimping), false, true]; +_target setVariable [QEGVAR(medical,isLimping), false, true]; // vitals _target setVariable [VAR_HEART_RATE, DEFAULT_HEART_RATE, true];