Skip to content

Commit

Permalink
Return guardian MAI: remove unnecessary condition
Browse files Browse the repository at this point in the history
We can never get to this point in the code if the unit does not have
moves.
  • Loading branch information
mattsc committed Mar 30, 2014
1 parent bf85bd5 commit 4b033e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions data/ai/micro_ais/cas/ca_return_guardian.lua
Expand Up @@ -35,9 +35,7 @@ function ca_return_guardian:execution(ai, cfg)
end

local nh = AH.next_hop(unit, x, y)
if unit.moves~=0 then
AH.movefull_stopunit(ai, unit, nh)
end
AH.movefull_stopunit(ai, unit, nh)
end

return ca_return_guardian

0 comments on commit 4b033e6

Please sign in to comment.