menu_handler: See all units in linger mode when reveal_map == true

Fixes the first problem in https://github.com/wesnoth/wesnoth/issues/3687#issuecomment-502403962:

> you played an MP game, the game is over and the map uncovered – you see now all units, but hotkeys don't work on previously shrouded ones

Note that SP linger mode, and MP linger mode when reveal_map == false,
are not affected.
This commit is contained in:
josteph 2019-06-17 15:59:44 +00:00
parent e2c3c327b2
commit bd16b2d595

View file

@ -644,7 +644,7 @@ void menu_handler::rename_unit()
unit_map::iterator menu_handler::current_unit()
{
const mouse_handler& mousehandler = pc_.get_mouse_handler_base();
const bool see_all = pc_.is_replay() && pc_.get_replay_controller()->see_all();
const bool see_all = gui_->show_everything() || (pc_.is_replay() && pc_.get_replay_controller()->see_all());
unit_map::iterator res = board().find_visible_unit(mousehandler.get_last_hex(), teams()[gui_->viewing_team()], see_all);
if(res != units().end()) {