diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 73299fba4b7..c0beb57f55c 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -17,6 +17,5 @@ archive and the following results where found for 687 files: before 1018.1 MB after 79.3 MB -Undoing a recruit are no longer possible, they could still cause OOS errors in -MP games. +Undoing recruits without random traits is no longer possible. diff --git a/changelog b/changelog index 674708df563..99e33dc61dc 100644 --- a/changelog +++ b/changelog @@ -34,6 +34,7 @@ Version 1.3.12+svn: * changing the langugage now sets the version number in the title properly. * show 'back to round xxx' also in 800 x 600 resolution + * undoing recruits is no longer allowed * miscellaneous and bug fixes: * various bug fixes and code cleanups * added gzip and gunzip command line parameters @@ -52,7 +53,6 @@ Version 1.3.12+svn: * loading a content with invalid wml does not terminate the game * increased the precission off the mouse in the top row of the editor (closes bug #10219) - * undoing recruits is no longer allowed Version 1.3.12: * campaigns: diff --git a/players_changelog b/players_changelog index 62db0ebfa23..28628cf6653 100644 --- a/players_changelog +++ b/players_changelog @@ -28,11 +28,11 @@ Version 1.3.12+svn: * Display the race in the unit preview panel. * Allow to use team labels also for 1-player-teams (bug #9747). * Show 'back to round xxx' also in 800 x 600 resolution. + * Undoing recruits is no longer allowed. * Miscellaneous and bug fixes * Replaced the 'Binary Saves' option with 'Compressed Saves' and now writes gzip files. - * Undoing recruits are no longer allowed. Version 1.3.12: * campaigns diff --git a/src/menu_events.cpp b/src/menu_events.cpp index c36a588efb4..dcb07a17f02 100644 --- a/src/menu_events.cpp +++ b/src/menu_events.cpp @@ -1065,8 +1065,15 @@ private: redo_stack_.clear(); assert(new_unit.type()); - clear_shroud(team_num); - clear_undo_stack(team_num); + // Dissallow undoing of recruits. Can be enabled again once the unit's + // description= key doesn't use random anymore. + const bool shroud_cleared = clear_shroud(team_num); + //if(shroud_cleared || new_unit.type()->genders().size() > 1 + // || new_unit.type()->has_random_traits()) { + clear_undo_stack(team_num); + /*} else { + undo_stack_.push_back(undo_action(new_unit,loc,RECRUIT_POS)); + } */ gui_->recalculate_minimap(); gui_->invalidate_game_status();