2016-09-04 09:25:03 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
|
|
|
* Checks if a unit needs treatment.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Does unit need treatment <BOOL>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* call ACE_medical_ai_fnc_isInjured
|
|
|
|
*
|
2016-09-04 09:25:03 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
if !(alive _this) exitWith {false};
|
|
|
|
|
2017-10-14 18:43:53 +00:00
|
|
|
private _bloodLoss = [_this] call EFUNC(medical,getBloodLoss);
|
|
|
|
private _pain = _this getVariable [QEGVAR(medical,pain), 0];
|
|
|
|
private _unconscious = _this getVariable ["ACE_isUnconscious", false];
|
2016-09-04 09:25:03 +00:00
|
|
|
// private _heartRate = _this getVariable [QEGVAR(medical,heartRate), 70];
|
|
|
|
|
2017-10-14 18:43:53 +00:00
|
|
|
(_bloodLoss > 0) || {_pain > 0.2} || _unconscious // || {_heartRate > 100} || {_heartRate < 40}
|