Skip to content

Commit

Permalink
wb: fix wrong simulated movement points when planning to capture a vi…
Browse files Browse the repository at this point in the history
…llage.

(cherry-picked from commit ff82a00)
  • Loading branch information
gfgtdf authored and Vultraz committed Oct 7, 2018
1 parent bd97d0c commit 81bd61a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pathfind/pathfind.cpp
Expand Up @@ -690,7 +690,12 @@ marked_route mark_route(const plain_route &rt, bool update_move_cost)

res.marks[*i] = marked_route::mark(turns, zoc, capture, invisible);

if (last_step) break; // finished and we used dummy move_cost
if(last_step) {
if(capture) {
total_costs += movement;
}
break; // finished and we used dummy move_cost
}

total_costs += movement;
movement = u.total_movement();
Expand Down

0 comments on commit 81bd61a

Please sign in to comment.