Apply patch from elias to fix bug #5910

This commit is contained in:
Rusty Russell 2006-05-07 04:42:18 +00:00
parent 051e43cf7a
commit b1bce9495b

View file

@ -474,6 +474,9 @@ gamemap::location ai_interface::move_unit_partial(location from, location to, st
info_.units.insert(std::pair<location,unit>(to,current_unit));
if(info_.map.is_village(to)) {
// if a new village is captured, disallow any future movement
if (!info_.teams[info_.team_num-1].owns_village(to))
info_.units.find(to)->second.set_movement(-1);
get_village(to,info_.teams,info_.team_num-1,info_.units);
}