From ac5fedff4451ce70e37bdf52808a438018af60bd Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Thu, 19 Jul 2018 18:12:59 +0100 Subject: [PATCH] Fix cardiac arrest timeout death (#6451) --- .../functions/fnc_conditionCardiacArrestTimer.sqf | 2 +- .../functions/fnc_enteredStateCardiacArrest.sqf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/medical_statemachine/functions/fnc_conditionCardiacArrestTimer.sqf b/addons/medical_statemachine/functions/fnc_conditionCardiacArrestTimer.sqf index 6e6354fd0c..1981901ffa 100644 --- a/addons/medical_statemachine/functions/fnc_conditionCardiacArrestTimer.sqf +++ b/addons/medical_statemachine/functions/fnc_conditionCardiacArrestTimer.sqf @@ -14,6 +14,6 @@ params ["_unit"]; private _startTime = _unit getVariable [QGVAR(cardiacArrestStart), CBA_missionTime]; -private _lifeTime = _unit getVariable [QGVAR(cardiacArrestTime), GVAR(cardiacArrestTime)]; +private _lifeTime = _unit getVariable [QGVAR(cardiacArrestTime), EGVAR(medical,cardiacArrestTime)]; (CBA_missionTime - _startTime) > _lifeTime diff --git a/addons/medical_statemachine/functions/fnc_enteredStateCardiacArrest.sqf b/addons/medical_statemachine/functions/fnc_enteredStateCardiacArrest.sqf index 6f8fcea695..7ab89e6528 100644 --- a/addons/medical_statemachine/functions/fnc_enteredStateCardiacArrest.sqf +++ b/addons/medical_statemachine/functions/fnc_enteredStateCardiacArrest.sqf @@ -18,7 +18,7 @@ params ["_unit"]; private _time = EGVAR(medical,cardiacArrestTime); _time = _time + random [_time*-0.1, 0, _time*0.1]; -_unit setVariable [QEGVAR(medical,cardiacArrestTime), _time]; -_unit setVariable [QEGVAR(medical,cardiacArrestStart), CBA_missionTime]; +_unit setVariable [QGVAR(cardiacArrestTime), _time]; +_unit setVariable [QGVAR(cardiacArrestStart), CBA_missionTime]; [_unit] call EFUNC(medical_status,setCardiacArrest);