Fix replay not automatically stopping at end

The deleted line was only reached when do_replay() found an end of a replay when at_end() returned false, which can only happen in the rare case that the last replay command was a chat command
This commit is contained in:
gfgtdf 2024-02-06 03:30:26 +01:00
parent 68f1a8c8db
commit 7401beb3b4
2 changed files with 2 additions and 3 deletions

View file

@ -836,6 +836,8 @@ void playsingle_controller::on_replay_end(bool is_unit_test)
e.is_victory = false;
set_end_level_data(e);
}
} else {
replay_controller_->stop_replay();
}
}

View file

@ -176,9 +176,6 @@ void replay_controller::play_side_impl()
if(res == REPLAY_FOUND_END_TURN) {
return;
}
if(res == REPLAY_RETURN_AT_END) {
stop_replay();
}
if(res == REPLAY_FOUND_INIT_TURN)
{
stop_condition_->new_side_turn(controller_.current_side(), controller_.gamestate().tod_manager_.turn());