From ccb01edcc23f82dbf486b63fd52fceb3bfbe7bee Mon Sep 17 00:00:00 2001 From: Wyqer Date: Thu, 5 Sep 2019 19:28:28 +0200 Subject: [PATCH] Changed indentation --- .../scripts/server/ai/building_defence_ai.sqf | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Missionframework/scripts/server/ai/building_defence_ai.sqf b/Missionframework/scripts/server/ai/building_defence_ai.sqf index 935ad0b1..fa84a80c 100644 --- a/Missionframework/scripts/server/ai/building_defence_ai.sqf +++ b/Missionframework/scripts/server/ai/building_defence_ai.sqf @@ -6,34 +6,34 @@ private _move_is_disabled = true; private _resume_movement = false; while {_move_is_disabled && local _unit && alive _unit && !(captive _unit)} do { - private _hostilecount = {alive _x && side _x == GRLIB_side_friendly} count ((getpos _unit) nearEntities [["Man"], 40]); + private _hostilecount = {alive _x && side _x == GRLIB_side_friendly} count ((getpos _unit) nearEntities [["Man"], 40]); - if ((_hostilecount > 0) || (damage _unit > 0.25)) then { - _resume_movement = true; - }; + if ((_hostilecount > 0) || (damage _unit > 0.25)) then { + _resume_movement = true; + }; - if (_sector != "") then { - if (_sector in blufor_sectors) then { - _resume_movement = true; - }; - }; + if (_sector != "") then { + if (_sector in blufor_sectors) then { + _resume_movement = true; + }; + }; - if (_resume_movement) then { - if (_move_is_disabled) then { - _move_is_disabled = false; - _unit enableAI "MOVE"; - _unit setUnitPos "AUTO"; - }; - }; + if (_resume_movement) then { + if (_move_is_disabled) then { + _move_is_disabled = false; + _unit enableAI "MOVE"; + _unit setUnitPos "AUTO"; + }; + }; - if (_move_is_disabled) then { - private _target = assignedTarget _unit; - if(!(isnull _target)) then { - private _vd = (getPosASL _target) vectorDiff (getpos _unit); - private _newdir = (_vd select 0) atan2 (_vd select 1); - if (_newdir < 0) then {_dir = 360 + _newdir}; - _unit setdir (_newdir); - }; - }; - sleep 5; + if (_move_is_disabled) then { + private _target = assignedTarget _unit; + if(!(isnull _target)) then { + private _vd = (getPosASL _target) vectorDiff (getpos _unit); + private _newdir = (_vd select 0) atan2 (_vd select 1); + if (_newdir < 0) then {_dir = 360 + _newdir}; + _unit setdir (_newdir); + }; + }; + sleep 5; };