Improve ai garrison pathing (#6649)

AI - Fix garrison pathing
This commit is contained in:
Josuan Albin 2018-10-23 20:28:30 +02:00 committed by PabstMirror
parent b8d4f981b2
commit 25f36d9340
2 changed files with 3 additions and 3 deletions

View File

@ -22,8 +22,8 @@
params ["_unitsArray"];
{
_x params ["_unit", "_pos"];
_unit doMove _pos;
_unit setDestination [_pos, "LEADER PLANNED", true];
_unit doMove _pos;
LOG_3("%1 doMove %2 | ID: %3",_unit,_pos,clientOwner);
} forEach _unitsArray;
}] call CBA_fnc_addEventHandler;

View File

@ -99,7 +99,7 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
if (unitReady _unit) then {
// Check for distance, doMove and AI are moody and may stop for no reason, within 6 meters and ready should be fine
if (_unitPos distance _pos < 3) then {
if (_unitPos distance _pos < 1.5) then {
call _fnc_attemptSuccessful;
} else {
@ -115,7 +115,7 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
// AI may sometimes not be able to report unitReady, this is to avoid the PFH running forever
switch true do {
case ((_unitPos distance _pos) < 3) : {
case ((_unitPos distance _pos) < 1.5) : {
call _fnc_attemptSuccessful;
};