Changed indentation

This commit is contained in:
Wyqer 2019-09-05 19:28:28 +02:00
parent be4ec40c7a
commit ccb01edcc2
No known key found for this signature in database
GPG Key ID: D7E2F8BD7F1E48FA
1 changed files with 26 additions and 26 deletions

View File

@ -6,34 +6,34 @@ private _move_is_disabled = true;
private _resume_movement = false; private _resume_movement = false;
while {_move_is_disabled && local _unit && alive _unit && !(captive _unit)} do { 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 { if ((_hostilecount > 0) || (damage _unit > 0.25)) then {
_resume_movement = true; _resume_movement = true;
}; };
if (_sector != "") then { if (_sector != "") then {
if (_sector in blufor_sectors) then { if (_sector in blufor_sectors) then {
_resume_movement = true; _resume_movement = true;
}; };
}; };
if (_resume_movement) then { if (_resume_movement) then {
if (_move_is_disabled) then { if (_move_is_disabled) then {
_move_is_disabled = false; _move_is_disabled = false;
_unit enableAI "MOVE"; _unit enableAI "MOVE";
_unit setUnitPos "AUTO"; _unit setUnitPos "AUTO";
}; };
}; };
if (_move_is_disabled) then { if (_move_is_disabled) then {
private _target = assignedTarget _unit; private _target = assignedTarget _unit;
if(!(isnull _target)) then { if(!(isnull _target)) then {
private _vd = (getPosASL _target) vectorDiff (getpos _unit); private _vd = (getPosASL _target) vectorDiff (getpos _unit);
private _newdir = (_vd select 0) atan2 (_vd select 1); private _newdir = (_vd select 0) atan2 (_vd select 1);
if (_newdir < 0) then {_dir = 360 + _newdir}; if (_newdir < 0) then {_dir = 360 + _newdir};
_unit setdir (_newdir); _unit setdir (_newdir);
}; };
}; };
sleep 5; sleep 5;
}; };