From 9b5c5bc8668fb31448eec08fa97aba0afcc01e61 Mon Sep 17 00:00:00 2001 From: Magnetar Date: Mon, 16 Jul 2018 15:35:34 +0200 Subject: [PATCH] Fix QGVAR medical variables --- addons/medical/functions/fnc_addDamageToUnit.sqf | 4 ++-- .../functions/fnc_handleStateUnconscious.sqf | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/medical/functions/fnc_addDamageToUnit.sqf b/addons/medical/functions/fnc_addDamageToUnit.sqf index bf7f9deedd..3f992c6e5b 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(medical,bodyPartDamage), [-1]]); +private _startDmg = +(_unit getVariable [QEGVAR(medical,bodyPartDamage), [-1]]); private _startPain = GET_PAIN(_unit); #endif [QEGVAR(medical,woundReceived), [_unit, _bodyPart, _damageToAdd, _instigator, _typeOfDamage]] call CBA_fnc_localEvent; #ifdef DEBUG_TESTRESULTS -private _endDmg = _unit getVariable [QGVAR(medical,bodyPartDamage), [-1]]; +private _endDmg = _unit getVariable [QEGVAR(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_statemachine/functions/fnc_handleStateUnconscious.sqf b/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf index 6a22b9fdcd..6cd07903c3 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 [EQGVAR(medical,lastWakeUpCheck), CBA_missionTime]; + private _lastWakeUpCheck = _unit getVariable [QEGVAR(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 [EQGVAR(medical,lastWakeUpCheck), CBA_missionTime]; + _unit setVariable [QEGVAR(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 [EQGVAR(medical,lastWakeUpCheck), CBA_missionTime]; + _unit setVariable [QEGVAR(medical,lastWakeUpCheck), CBA_missionTime]; }; };