From f1fbf6a8ebe09cfd166e5995271adf61b8d38596 Mon Sep 17 00:00:00 2001 From: Zakant Date: Thu, 23 Mar 2017 14:00:55 +0100 Subject: [PATCH] Removed legacy code --- .../medical/functions/fnc_setCardiacArrest.sqf | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 9354784662..8e7509eb6f 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -25,20 +25,3 @@ _unit setVariable [QGVAR(heartRate), 0, true]; [_unit, true] call FUNC(setUnconscious); [QEGVAR(medical,InjuryCritical), _unit] call CBA_fnc_localEvent; -private _timeInCardiacArrest = 120 + round(random(600)); - -[{ - params ["_args", "_idPFH"]; - _args params ["_unit", "_startTime", "_timeInCardiacArrest"]; - - private _heartRate = _unit getVariable [QGVAR(heartRate), DEFAULT_HEART_RATE]; - if (_heartRate > 20 || !alive _unit) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - _unit setVariable [QGVAR(inCardiacArrest), nil, true]; - }; - if (CBA_missionTime - _startTime >= _timeInCardiacArrest) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - _unit setVariable [QGVAR(inCardiacArrest), nil, true]; - [_unit] call FUNC(setDead); - }; -}, 1, [_unit, CBA_missionTime, _timeInCardiacArrest] ] call CBA_fnc_addPerFrameHandler;