mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical AI - Use suppressed EH to determine safety of AI (#8242)
* Use suppressed EH to determine safety of AI * Require CBA 3.15.3 --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: BrettMayson <brett@mayson.io>
This commit is contained in:
parent
e5654914cc
commit
728f556ae4
@ -14,6 +14,10 @@
|
||||
_unit setVariable [QGVAR(lastHit), CBA_missionTime];
|
||||
}] call CBA_fnc_addClassEventHandler;
|
||||
|
||||
["CAManBase", "Suppressed", {
|
||||
params ["_unit"];
|
||||
_unit setVariable [QGVAR(lastSuppressed), CBA_missionTime];
|
||||
}] call CBA_fnc_addClassEventHandler;
|
||||
|
||||
#include "stateMachine.sqf"
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
|
@ -11,5 +11,6 @@ PREP_RECOMPILE_END;
|
||||
// default time values for AI being ready to heal, used in fnc_isSafe
|
||||
if (isNil QGVAR(timeSafe_shoot)) then { GVAR(timeSafe_shoot) = 30; };
|
||||
if (isNil QGVAR(timeSafe_hit)) then { GVAR(timeSafe_hit) = 30; };
|
||||
if (isNil QGVAR(timeSafe_suppressed)) then { GVAR(timeSafe_suppressed) = 30; };
|
||||
|
||||
ADDON = true;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
(getSuppression _this == 0)
|
||||
&& {CBA_missionTime - (_this getVariable [QGVAR(lastFired), -999999]) > GVAR(timeSafe_shoot)}
|
||||
(CBA_missionTime - (_this getVariable [QGVAR(lastFired), -999999]) > GVAR(timeSafe_shoot))
|
||||
&& {CBA_missionTime - (_this getVariable [QGVAR(lastHit), -999999]) > GVAR(timeSafe_hit)}
|
||||
&& {CBA_missionTime - (_this getVariable [QGVAR(lastSuppressed), -999999]) > GVAR(timeSafe_suppressed)}
|
||||
&& {!(_this getVariable [QEGVAR(captives,isHandcuffed), false])}
|
||||
|
Loading…
Reference in New Issue
Block a user