From adf920de218912c37f6fd39913cdd648089edaad Mon Sep 17 00:00:00 2001 From: nk3nny Date: Sun, 5 May 2024 20:07:37 +0200 Subject: [PATCH] Allows Armoured artillery with multiple turrets to continue defend themselves (#394) --- addons/danger/functions/fnc_brainVehicle.sqf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/danger/functions/fnc_brainVehicle.sqf b/addons/danger/functions/fnc_brainVehicle.sqf index d9aaa556..7e89a559 100644 --- a/addons/danger/functions/fnc_brainVehicle.sqf +++ b/addons/danger/functions/fnc_brainVehicle.sqf @@ -67,7 +67,12 @@ if (_artillery) exitWith { _vehicle setVariable [QEGVAR(main,isArtillery), true]; // enemies within 12-30m may cause crew to disembark! - if (_attack && {_dangerCausedBy distance _vehicle < (12 + random 18)} && {currentCommand _unit isEqualTo ""}) then { + if ( + _attack + && {_dangerCausedBy distance _vehicle < (12 + random 18)} + && {currentCommand _unit isEqualTo ""} + && {!(_vehicle isKindOf "Tank" && {count (allTurrets [_vehicle, false]) > 1})} + ) then { private _vehicleCrew = crew _vehicle; _vehicleCrew orderGetIn false; {