Fast MAI: bug fix for scenarios when there is no enemy leader (for the AI)

In this case, it can happen that there are no goals (e.g. if there are
also no villages or if the AI has no leader). Previously, this
situation caused an error message.
This commit is contained in:
mattsc 2015-02-12 12:15:04 -08:00
parent b8608b199f
commit b7907127ae

View file

@ -131,6 +131,7 @@ function ca_fast_move:execution(ai, cfg, self)
end
local keep_moving, next_goal = true, 0
if (not goals[1]) then keep_moving = false end
while keep_moving do
keep_moving = false