ACE3/addons/medical_treatment/functions/fnc_treatmentCPR_start.sqf

24 lines
596 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
2017-03-23 12:15:17 +00:00
/*
* Author: Zakant
2017-03-23 17:17:38 +00:00
* Handles the start of the CPR treatment.
2017-03-23 12:15:17 +00:00
*
2017-03-23 12:19:25 +00:00
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
*
2017-03-23 12:15:17 +00:00
* Return Value:
2017-03-23 16:26:16 +00:00
* None
2017-03-23 12:15:17 +00:00
*
* Public: No
*/
2017-03-23 16:32:03 +00:00
2017-03-23 12:19:25 +00:00
params ["_caller", "_target"];
2017-03-23 12:15:17 +00:00
_target setVariable [QGVAR(receiveCPR), true, true]; // Target receives CPR
if (EGVAR(medical,CPRcreatesPulse) && {GET_HEART_RATE(_target) == 0}) then {
_target setVariable [VAR_HEART_RATE, round (30 + random [-5, 0, 5]) , true]; // And we have a (random) pulse
2017-03-23 12:15:17 +00:00
};
_target setVariable [QEGVAR(medical,lastTimeUpdated), CBA_missionTime, true];