Messenger MAI: fix bug of own units blocking waypoint

ignore_own_units=true was accidentally dropped when adding [avoid] tag functionality to the Micro AI in a60736b6c7
This commit is contained in:
mattsc 2021-09-01 08:49:54 -07:00
parent 551357f48b
commit b73078884c
2 changed files with 2 additions and 1 deletions

View file

@ -19,6 +19,7 @@
### Miscellaneous and Bug Fixes
* Fixed: keyboard input during the loading screen intermittently caused a crash (issue #4447)
* AI: fixed custom synced commands not changing the game state
* Messenger MAI: fixed bug of own units sometimes blocking the path to a waypoint for the messenger
## Version 1.15.14
### Add-ons client

View file

@ -31,7 +31,7 @@ function ca_messenger_move:execution(cfg)
local path = AH.find_path_with_avoid(messenger, x, y, avoid_map)
if (not path) then path = { { messenger.x, messenger.y } } end
local next_hop = AH.next_hop(messenger, x, y, { path = path, avoid_map = avoid_map } )
local next_hop = AH.next_hop(messenger, x, y, { path = path, avoid_map = avoid_map, ignore_own_units = true } )
if (not next_hop) then next_hop = { messenger.x, messenger.y } end
-- Compare this to the "ideal path"