From 56cb638aff2e4ac9fc6ed5767c96b190830479c4 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Thu, 27 Jun 2019 23:11:51 +0100 Subject: [PATCH] Stop AI firing at unconscious units (#7074) This just reimplemented the behaviour from #5864 I believe we though using `setUnconscious` command would make this unnecessary, but testing seems to show that's not the case --- addons/medical_status/functions/fnc_setUnconscious.sqf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/medical_status/functions/fnc_setUnconscious.sqf b/addons/medical_status/functions/fnc_setUnconscious.sqf index a7869c6417..cfc20e6a6f 100644 --- a/addons/medical_status/functions/fnc_setUnconscious.sqf +++ b/addons/medical_status/functions/fnc_setUnconscious.sqf @@ -24,6 +24,9 @@ _unit setVariable [VAR_UNCON, _active, true]; // Toggle unit ragdoll state [_unit, _active] call EFUNC(medical_engine,setUnconsciousAnim); +// Stop AI firing at unconscious units in most situations (global effect) +[_unit, "setHidden", "ace_unconscious", _active] call EFUNC(common,statusEffect_set); + if (_active) then { // Don't bother setting this if not used if (EGVAR(medical,spontaneousWakeUpChance) > 0) then {