2017-03-23 12:15:17 +00:00
|
|
|
/*
|
|
|
|
* Author: Zakant
|
|
|
|
* Handels the start of the CPR treatment.
|
|
|
|
*
|
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
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
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
|
2017-03-23 12:36:57 +00:00
|
|
|
if(EGVAR(medical,CPRcreatesPulse) && {_target getVariable [QEGVAR(medical,heartRate), 80] == 0}) then {
|
2017-03-23 12:15:17 +00:00
|
|
|
_target setVariable [QEGVAR(medical,heartRate), round (30 + random [-5, 0, 5]) , true]; // And we have a (random) pulse
|
|
|
|
};
|
|
|
|
|
|
|
|
_target setVariable [QEGVAR(medical,lastTimeUpdated), CBA_missionTime, true];
|