Return Guardian MAI: fix bug when path to return hex is blocked
Such as when the unit is surrounded.
This commit is contained in:
parent
8969c7a60e
commit
28d2c9e279
2 changed files with 3 additions and 0 deletions
|
@ -67,6 +67,7 @@ Version 1.11.15+dev:
|
|||
incorrectly set more helpful.
|
||||
* Fix bug in Random Recruit Micro AI: the AI can now handle custom castle
|
||||
terrain independent of its terrain code
|
||||
* Fix bug in Return Guardian Micro AI when there is no path to the return hex
|
||||
|
||||
Version 1.11.15:
|
||||
* Graphics:
|
||||
|
|
|
@ -35,6 +35,8 @@ function ca_return_guardian:execution(ai, cfg)
|
|||
end
|
||||
|
||||
local nh = AH.next_hop(guardian, x, y)
|
||||
if (not nh) then nh = { guardian.x, guardian.y } end
|
||||
|
||||
AH.movefull_stopunit(ai, guardian, nh)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue