fixup 'fix game freezes on droiding when using dsu #3453'
fixes https://github.com/wesnoth/wesnoth/issues/3486
This commit is contained in:
parent
3cb6adeb69
commit
2181a56c5d
1 changed files with 1 additions and 1 deletions
|
@ -389,7 +389,7 @@ void undo_list::undo()
|
|||
resources::recorder->redo(replay_data);
|
||||
undos_.emplace_back(std::move(action));
|
||||
}
|
||||
if(std::all_of(undos_.begin(), undos_.begin(), [](const action_ptr_t& action){ return dynamic_cast<undo_action*>(action.get()) == nullptr; }))
|
||||
if(std::all_of(undos_.begin(), undos_.end(), [](const action_ptr_t& action){ return dynamic_cast<undo_action*>(action.get()) == nullptr; }))
|
||||
{
|
||||
//clear the undo stack if it only contains dsu related actions, this in particular makes sure loops like `while(can_undo()) { undo(); }`always stop.
|
||||
undos_.clear();
|
||||
|
|
Loading…
Add table
Reference in a new issue