2016-09-04 09:25:03 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
|
|
|
* Checks if a unit needs treatment.
|
|
|
|
*
|
|
|
|
* Arguments:
|
2017-10-24 21:13:12 +00:00
|
|
|
* Unit <OBJECT>
|
2016-09-04 09:25:03 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Does unit need treatment <BOOL>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
2017-10-24 21:13:12 +00:00
|
|
|
* player call ACE_medical_ai_fnc_isInjured
|
2017-06-08 13:31:51 +00:00
|
|
|
*
|
2016-09-04 09:25:03 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
if !(alive _this) exitWith {false};
|
|
|
|
|
2018-04-27 15:03:55 +00:00
|
|
|
private _bloodLoss = GET_BLOOD_LOSS(_this);
|
2018-05-08 07:47:03 +00:00
|
|
|
private _pain = GET_PAIN_PERCEIVED(_this);
|
2018-04-27 15:03:55 +00:00
|
|
|
private _unconscious = IS_UNCONSCIOUS(_this);
|
2016-09-04 09:25:03 +00:00
|
|
|
|
2017-10-24 21:13:12 +00:00
|
|
|
(_bloodLoss > 0) || {_pain > 0.2} || _unconscious
|