2018-07-30 09:22:14 +00:00
|
|
|
#include "script_component.hpp"
|
2017-03-23 12:21:36 +00:00
|
|
|
/*
|
|
|
|
* Author: Zakant
|
2017-03-23 17:17:38 +00:00
|
|
|
* Handles the progress of the CPR treatment.
|
2017-03-23 12:21:36 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Arguments <ARRAY>
|
2017-03-23 16:23:18 +00:00
|
|
|
* 0: Caller <OBJECT>
|
|
|
|
* 1: Target <OBJECT>
|
2017-03-23 12:21:36 +00:00
|
|
|
* 1: Elapsed Time <NUMBER>
|
|
|
|
* 2: Total Time <NUMBER>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2017-03-23 16:23:18 +00:00
|
|
|
* May Treatment continue <BOOL>
|
2017-03-23 12:21:36 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2017-03-23 16:32:03 +00:00
|
|
|
|
2017-03-23 12:26:06 +00:00
|
|
|
params ["_args", "_elapsedTime", "_totalTime"];
|
|
|
|
_args params ["_caller", "_target"];
|
|
|
|
|
2017-03-23 15:55:00 +00:00
|
|
|
// If the patient awakes by mysterious force, no cpr is needed!
|
2017-03-23 17:40:18 +00:00
|
|
|
if (_target call EFUNC(common,isAwake)) exitWith {false};
|
2018-05-22 17:06:28 +00:00
|
|
|
if !IN_CRDC_ARRST(_target) exitWith {false};
|
2017-03-23 12:26:06 +00:00
|
|
|
|
|
|
|
[_target] call FUNC(calculateBlood); // Calculate blood volume. If their is no pulse, nothing happens!
|
2018-08-12 10:50:47 +00:00
|
|
|
|
|
|
|
true
|