Fix cardiac arrest timeout death (#6451)

This commit is contained in:
SilentSpike 2018-07-19 18:12:59 +01:00 committed by Thomas Kooi
parent 13cdb76dce
commit ac5fedff44
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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);