Fixed problem with AI moving off keep too much
This commit is contained in:
parent
27bc47a4a5
commit
cc85959762
2 changed files with 5 additions and 2 deletions
|
@ -165,10 +165,13 @@ void ai::calculate_possible_moves(std::map<location,paths>& res, move_map& srcds
|
|||
continue;
|
||||
}
|
||||
|
||||
if(!enemy && un_it->second.can_recruit()) {
|
||||
if(!enemy && (un_it->second.can_recruit() || un_it->second.stone())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//if it's an enemy unit, reset its moves while we do the calculations
|
||||
const unit_movement_resetter move_resetter(un_it->second,enemy);
|
||||
|
||||
//insert the trivial moves of staying on the same location
|
||||
if(un_it->second.movement_left() == un_it->second.total_movement()) {
|
||||
std::pair<location,location> trivial_mv(un_it->first,un_it->first);
|
||||
|
|
|
@ -274,7 +274,7 @@ int show_dialog(display& disp, SDL_Surface* image,
|
|||
|
||||
const int border_size = 6;
|
||||
|
||||
const int max_line_length = 58;
|
||||
const int max_line_length = 54;
|
||||
|
||||
std::string message = msg;
|
||||
const size_t longest_line = text_to_lines(message,max_line_length);
|
||||
|
|
Loading…
Add table
Reference in a new issue