Backported: Fixed OoS bug when giving control and having move in undo stack.
This commit is contained in:
parent
d4c88b577f
commit
6bac46e285
3 changed files with 10 additions and 1 deletions
|
@ -9,6 +9,8 @@ Version 1.4.4+svn:
|
|||
* updated translations: Chinese (Traditional), Danish, French, Hungarian,
|
||||
Italian, Lithuanian, Russian, Spanish
|
||||
* fonts: DejaVuSans 2.26
|
||||
* miscellaneous and bug fixes:
|
||||
* Fixed OOS bug when giving control and having move in undo stack.
|
||||
|
||||
Version 1.4.4:
|
||||
* language and i18n:
|
||||
|
|
|
@ -13,7 +13,9 @@ Version 1.4.4+svn:
|
|||
* language and i18n:
|
||||
* updated translations: Chinese (Traditional), Danish, French, Italian,
|
||||
Lithuanian, Russian, Spanish.
|
||||
|
||||
|
||||
* Miscellaneous and bug fixes:
|
||||
* Fixed OOS bug when giving control and having move in undo stack.
|
||||
Version 1.4.4:
|
||||
* language and i18n:
|
||||
* new translation: Latvian
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include "sound.hpp"
|
||||
#include "upload_log.hpp"
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#define LOG_NG LOG_STREAM(info, engine)
|
||||
|
@ -182,6 +184,9 @@ void playmp_controller::play_human_turn(){
|
|||
try{
|
||||
if (turn_data_->process_network_data(cfg,res,backlog,skip_replay_) == turn_info::PROCESS_RESTART_TURN)
|
||||
{
|
||||
// Clean undo stack if turn has to be restarted (losing control)
|
||||
while(!undo_stack_.empty())
|
||||
menu_handler_.undo(gui_->get_playing_team() + 1);
|
||||
throw end_turn_exception(gui_->get_playing_team() + 1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue