ACE3/addons/medical_ai/XEH_postInit.sqf
BaerMitUmlaut b389740a29
Medical AI - Fix AI healing itself too fast when hit (#7955)
* Fix AI healing itself too fast when hit

* make time constants gvars

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2020-10-29 11:38:24 -05:00

20 lines
643 B
Plaintext

#include "script_component.hpp"
["ace_settingsInitialized", {
TRACE_1("settingsInitialized", GVAR(enabledFor));
if (GVAR(enabledFor) == 0) exitWith {}; // 0: disabled
if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients
["ace_firedNonPlayer", {
_unit setVariable [QGVAR(lastFired), CBA_missionTime];
}] call CBA_fnc_addEventHandler;
["CAManBase", "Hit", {
params ["_unit"];
_unit setVariable [QGVAR(lastHit), CBA_missionTime];
}] call CBA_fnc_addClassEventHandler;
#include "stateMachine.sqf"
}] call CBA_fnc_addEventHandler;