ACE3/addons/medical_treatment/functions/fnc_treatmentCPR_progress.sqf
2018-05-22 18:06:28 +01:00

29 lines
742 B
Plaintext

/*
* Author: Zakant
* Handles the progress of the CPR treatment.
*
* Arguments:
* 0: Arguments <ARRAY>
* 0: Caller <OBJECT>
* 1: Target <OBJECT>
* 1: Elapsed Time <NUMBER>
* 2: Total Time <NUMBER>
*
* Return Value:
* May Treatment continue <BOOL>
*
* Public: No
*/
#include "script_component.hpp"
params ["_args", "_elapsedTime", "_totalTime"];
_args params ["_caller", "_target"];
// If the patient awakes by mysterious force, no cpr is needed!
if (_target call EFUNC(common,isAwake)) exitWith {false};
if !IN_CRDC_ARRST(_target) exitWith {false};
[_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