automaticially end replaymode at the end of a mp turn replay.
previously it did happen that users did not know how to 'escape' from the replay mode in that case.
This commit is contained in:
parent
beeb5b43e2
commit
f093341bb4
1 changed files with 5 additions and 2 deletions
|
@ -208,7 +208,7 @@ void playsingle_controller::play_scenario_main_loop()
|
|||
resources::gameboard->teams()[i].set_local(local_players[i]);
|
||||
}
|
||||
play_scenario_init();
|
||||
replay_.reset(new replay_controller(*this, false, ex.level));
|
||||
replay_.reset(new replay_controller(*this, false, ex.level, [this](){ on_replay_end(false); } ));
|
||||
if(ex.start_replay) {
|
||||
replay_->play_replay();
|
||||
}
|
||||
|
@ -694,7 +694,10 @@ bool playsingle_controller::should_return_to_play_side() const
|
|||
|
||||
void playsingle_controller::on_replay_end(bool is_unit_test)
|
||||
{
|
||||
if(is_unit_test) {
|
||||
if(is_networked_mp()) {
|
||||
set_player_type_changed();
|
||||
}
|
||||
else if(is_unit_test) {
|
||||
replay_->return_to_play_side();
|
||||
if(!is_regular_game_end()) {
|
||||
end_level_data e;
|
||||
|
|
Loading…
Add table
Reference in a new issue