Fast & easy fix of the move problem.

Now the unit rests on the waypoint until the next turn
This commit is contained in:
Dmitry Kovalenko 2011-06-17 10:19:03 +00:00
parent bf8300c064
commit 93cfadb5bc

View file

@ -343,7 +343,7 @@ function my_ai:patrol_gen(ai, n, w1, w2) -- n is the name of the unit, like Kire
if (x == waypoints[wpn].x and y == waypoints[wpn].y) then
wpn = 3 - wpn -- hardcoded for two waypoints
end
ai.move(unit, waypoints[wpn].x, waypoints[wpn].y)
ai.move_full(unit, waypoints[wpn].x, waypoints[wpn].y)
end
end