Implemented cpr progress function

This commit is contained in:
Zakant 2017-03-23 13:26:06 +01:00
parent b1dc4e0c52
commit d9aab91f97

View File

@ -15,3 +15,13 @@
* Public: No
*/
#include "script_component.hpp"
params ["_args", "_elapsedTime", "_totalTime"];
_args params ["_caller", "_target"];
// If the patient awakes my mysterious force, no cpr is needed!
if(_target call EFUNC(common,isAwake)) exitWith {false};
if(!(_target getVariable [QEGVAR(medical,inCardiacArrest), false])) 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