Skip to content

Commit

Permalink
Coward MAI: remove unnecessary condition
Browse files Browse the repository at this point in the history
ai_helper.movefull_stopunit takes care of this internally.
  • Loading branch information
mattsc committed Mar 30, 2014
1 parent 8671ed1 commit bf85bd5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions data/ai/micro_ais/cas/ca_coward.lua
Expand Up @@ -102,10 +102,7 @@ function ca_coward:execution(ai, cfg)
end
--items.place_image(mx, my, "items/ring-gold.png")

-- (mx,my) is the position to move to
if (mx ~= unit.x or my ~= unit.y) then
AH.movefull_stopunit(ai, unit, mx, my)
end
AH.movefull_stopunit(ai, unit, mx, my)
if (not unit) or (not unit.valid) then return end

AH.checked_stopunit_all(ai, unit)
Expand Down

0 comments on commit bf85bd5

Please sign in to comment.