ACE3/addons/medical_treatment/functions/fnc_treatmentCPR_progress.sqf

29 lines
742 B
Plaintext
Raw Normal View History

/*
* Author: Zakant
2017-03-23 17:17:38 +00:00
* Handles the progress of the CPR treatment.
*
* Arguments:
* 0: Arguments <ARRAY>
2017-03-23 16:23:18 +00:00
* 0: Caller <OBJECT>
* 1: Target <OBJECT>
* 1: Elapsed Time <NUMBER>
* 2: Total Time <NUMBER>
*
* Return Value:
2017-03-23 16:23:18 +00:00
* May Treatment continue <BOOL>
*
* Public: No
*/
#include "script_component.hpp"
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!
(alive _target) // CPR may only proceed if the patient is not dead