Show the turn dialog before updating the GUI for the incoming player.

In hotseat games, the main map and minimap were updated and healing was animated
before blacking out the display for the turn dialog.

Fixes #4187.
This commit is contained in:
josteph 2019-07-21 19:16:46 +00:00 committed by jostephd
parent ad9bb8b845
commit 21ec7963ef
5 changed files with 6 additions and 4 deletions

View file

@ -1217,6 +1217,10 @@ void play_controller::play_turn()
// If a side is empty skip over it.
if (!current_team().is_empty()) {
// Show the turn dialog now, before the minimap is redrawn and before healing is animated.
if(current_team().is_local_human() && current_team().is_proxy_human()) {
show_turn_dialog();
}
init_side_begin();
if(gamestate_->init_side_done()) {
// This is the case in a reloaded game where the side was initialized before saving the game.

View file

@ -304,6 +304,7 @@ protected:
void fire_start();
void start_game();
virtual void init_gui();
virtual void show_turn_dialog() {}
void finish_side_turn();
void finish_turn(); //this should not throw an end turn or end level exception
bool enemies_visible() const;

View file

@ -122,7 +122,6 @@ void playmp_controller::play_human_turn()
const std::unique_ptr<countdown_clock> timer(saved_game_.mp_settings().mp_countdown
? new countdown_clock(current_team())
: nullptr);
show_turn_dialog();
if(undo_stack().can_undo()) {
// If we reload a networked mp game we cannot undo moves made before the save
// because other players already received them

View file

@ -458,8 +458,6 @@ void playsingle_controller::execute_gotos()
}
void playsingle_controller::play_human_turn() {
show_turn_dialog();
if (!preferences::disable_auto_moves()) {
execute_gotos();
}

View file

@ -65,7 +65,7 @@ public:
protected:
virtual void play_side_impl() override;
void before_human_turn();
void show_turn_dialog();
virtual void show_turn_dialog() override;
void execute_gotos();
virtual void play_human_turn();
virtual void after_human_turn();