Skip to content

Commit

Permalink
Fast MAI: bug fix for scenarios when there is no enemy leader (for th…
Browse files Browse the repository at this point in the history
…e 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.
  • Loading branch information
mattsc authored and mattsc committed Feb 12, 2015
1 parent b8608b1 commit b790712
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions data/ai/micro_ais/cas/ca_fast_move.lua
Expand Up @@ -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

Expand Down

0 comments on commit b790712

Please sign in to comment.