mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 04:12:03 +00:00
fixup 'fix game freezes on droiding when using dsu #3453'
fixes https://github.com/wesnoth/wesnoth/issues/3486 (cherry-picked from commit 08bb6a4e9600bfe1aa533d684cc5fa1f8a9ed0f4)
This commit is contained in:
parent
9cc105f018
commit
3c8143539e
@ -389,7 +389,7 @@ void undo_list::undo()
|
|||||||
resources::recorder->redo(replay_data);
|
resources::recorder->redo(replay_data);
|
||||||
undos_.emplace_back(std::move(action));
|
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.
|
//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();
|
undos_.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user