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 07:21:21 -07:00
parent 851c49fcc3
commit 1fe6e24b64
2 changed files with 2 additions and 1 deletions

View file

@ -14,6 +14,7 @@
### User interface
### WML Engine
### Miscellaneous and Bug Fixes
* Messenger MAI: fixed bug of own units sometimes blocking the path to a waypoint for the messenger
## Version 1.15.15
### Campaigns

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"