made vision range based on potential movement

This commit is contained in:
Dave White 2004-08-30 01:36:32 +00:00
parent 3b70cd0127
commit 99781f3447
2 changed files with 10 additions and 2 deletions

View file

@ -1455,7 +1455,15 @@ bool clear_shroud_unit(const gamemap& map,
{
std::vector<gamemap::location> cleared_locations;
paths p(map,status,gamedata,units,loc,teams,true,false);
const unit_map::const_iterator u = units.find(loc);
if(u == units.end()) {
return false;
}
unit_map temp_units;
temp_units.insert(*u);
paths p(map,status,gamedata,temp_units,loc,teams,true,false);
for(paths::routes_map::const_iterator i = p.routes.begin();
i != p.routes.end(); ++i) {
clear_shroud_loc(map,teams[team],i->first,&cleared_locations);

View file

@ -1423,7 +1423,7 @@ void turn_info::save_game(const std::string& message, gui::DIALOG_TYPE dialog_ty
gui::show_dialog(gui_,NULL,_("Saved"),_("The game has been saved"), gui::OK_ONLY);
}
} catch(gamestatus::save_game_failed& e) {
gui::show_dialog(gui_,NULL,"",_("The game could not be saved"),gui::MESSAGE);
gui::show_dialog(gui_,NULL,_("Error"),_("The game could not be saved"),gui::MESSAGE);
//do not bother retrying, since the user can just try to save the game again
};
}