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
06b05067b5
commit
474b8990d8
2 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@ Version 1.13.0-dev:
|
|||
some minor and subtle bugs.
|
||||
* 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
|
||||
* Campaigns:
|
||||
* Changed all occurrences of {FLAG_VARIANT ragged} to {FLAG_VARIANT6 ragged}
|
||||
* Eastern Invasion:
|
||||
|
|
|
@ -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