Only create pulse if their isn't any

This commit is contained in:
Zakant 2017-03-23 13:36:57 +01:00
parent 86bf9f4262
commit 59c4485ef9

View File

@ -15,7 +15,7 @@
params ["_caller", "_target"];
_target setVariable [QGVAR(receiveCPR), true, true]; // Target receives CPR
if(EGVAR(medical,CPRcreatesPulse)) then {
if(EGVAR(medical,CPRcreatesPulse) && {_target getVariable [QEGVAR(medical,heartRate), 80] == 0}) then {
_target setVariable [QEGVAR(medical,heartRate), round (30 + random [-5, 0, 5]) , true]; // And we have a (random) pulse
};