2018-07-30 09:22:14 +00:00
|
|
|
#include "script_component.hpp"
|
2016-09-04 09:25:03 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
|
|
|
* Makes the unit heal itself.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* call ACE_medical_ai_fnc_healSelf
|
2016-09-04 09:25:03 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Player will have to do this manually of course
|
2016-09-12 15:04:48 +00:00
|
|
|
if ([_this] call EFUNC(common,isPlayer)) exitWith {};
|
2016-09-04 09:25:03 +00:00
|
|
|
// Can't heal self when unconscious
|
2019-07-03 14:59:28 +00:00
|
|
|
if IS_UNCONSCIOUS(_this) exitWith {
|
|
|
|
_this setVariable [QGVAR(currentTreatment), nil];
|
2016-09-04 09:25:03 +00:00
|
|
|
};
|
2019-07-03 14:59:28 +00:00
|
|
|
|
|
|
|
[_this, _this] call FUNC(healingLogic);
|