Only execute the local handling of CPR when in a valid state

This commit is contained in:
Glowbal 2015-06-20 12:46:26 +02:00
parent 385baf1331
commit ea0be1f563

View File

@ -23,7 +23,7 @@ _selectionName = _this select 2;
_className = _this select 3;
_items = _this select 4;
// TODO replace by event system instead
[[_caller, _target], QUOTE(DFUNC(treatmentAdvanced_CPRLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
if (_target getvariable [QGVAR(inCardiacArrest), false] || _target getvariable [QGVAR(inReviveState), false]) then {
[[_caller, _target], QUOTE(DFUNC(treatmentAdvanced_CPRLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
};
true;