Fix a bug allowing to select the initial empty position of a unit...

...during its move (showing footsteps from there etc...). It was
especially visible when using "next unit" (but still other things to
fix about that part)
This commit is contained in:
Ali El Gariani 2009-03-09 23:19:15 +00:00
parent d2b7e2bf08
commit 5e9c398263
2 changed files with 2 additions and 2 deletions

View file

@ -285,7 +285,7 @@ image::TYPE game_display::get_image_type(const map_location& loc) {
} else if (loc == selectedHex_) {
unit_map::iterator un = find_visible_unit(units_, loc, get_map(),
teams_, teams_[currentTeam_], !viewpoint_);
if (un != units_.end()) {
if (un != units_.end() && !un->second.get_hidden()) {
return image::BRIGHTENED;
}
}

View file

@ -435,7 +435,7 @@ void mouse_handler::select_hex(const map_location& hex, const bool browse) {
show_partial_move_ = false;
unit_map::iterator u = find_unit(hex);
if(hex.valid() && u != units_.end() ) {
if(hex.valid() && u != units_.end() && !u->second.get_hidden()) {
next_unit_ = u->first;
// if it's not the unit's turn, we reset its moves