Skip to content

Commit

Permalink
Allows Armoured artillery with multiple turrets to continue defend th…
Browse files Browse the repository at this point in the history
…emselves (#394)
  • Loading branch information
nk3nny authored May 5, 2024
1 parent 559af34 commit adf920d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion addons/danger/functions/fnc_brainVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
{
Expand Down

0 comments on commit adf920d

Please sign in to comment.