mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 00:58:29 +00:00
don't ask the user twice about old version when loading a save
The issue only affected saves loaded from the in-game menu.
This commit is contained in:
parent
5a7f2becf0
commit
615d4024ce
@ -19,3 +19,4 @@ bool game::load_game_exception::show_replay;
|
||||
bool game::load_game_exception::cancel_orders;
|
||||
bool game::load_game_exception::select_difficulty;
|
||||
std::string game::load_game_exception::difficulty;
|
||||
bool game::load_game_exception::skip_version_check;
|
||||
|
@ -74,7 +74,8 @@ public:
|
||||
, const bool show_replay_
|
||||
, const bool cancel_orders_
|
||||
, const bool select_difficulty_
|
||||
, const std::string& difficulty_)
|
||||
, const std::string& difficulty_
|
||||
, bool skip_version_check_ = false)
|
||||
: tlua_jailbreak_exception()
|
||||
{
|
||||
game = game_;
|
||||
@ -82,6 +83,7 @@ public:
|
||||
cancel_orders = cancel_orders_;
|
||||
select_difficulty = select_difficulty_;
|
||||
difficulty = difficulty_;
|
||||
skip_version_check = skip_version_check_;
|
||||
}
|
||||
|
||||
static std::string game;
|
||||
@ -89,6 +91,7 @@ public:
|
||||
static bool cancel_orders;
|
||||
static bool select_difficulty;
|
||||
static std::string difficulty;
|
||||
static bool skip_version_check;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -652,7 +652,7 @@ bool game_launcher::load_game()
|
||||
state_);
|
||||
|
||||
try {
|
||||
if(!load.load_game(game::load_game_exception::game, game::load_game_exception::show_replay, game::load_game_exception::cancel_orders, game::load_game_exception::select_difficulty, game::load_game_exception::difficulty)) {
|
||||
if(!load.load_game(game::load_game_exception::game, game::load_game_exception::show_replay, game::load_game_exception::cancel_orders, game::load_game_exception::select_difficulty, game::load_game_exception::difficulty, game::load_game_exception::skip_version_check)) {
|
||||
clear_loaded_game();
|
||||
return false;
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ bool loadgame::load_game()
|
||||
return false;
|
||||
}
|
||||
|
||||
throw game::load_game_exception(filename_, show_replay_, cancel_orders_, select_difficulty_, difficulty_);
|
||||
throw game::load_game_exception(filename_, show_replay_, cancel_orders_, select_difficulty_, difficulty_, true);
|
||||
}
|
||||
|
||||
bool loadgame::load_game(
|
||||
@ -205,7 +205,8 @@ bool loadgame::load_game(
|
||||
, const bool show_replay
|
||||
, const bool cancel_orders
|
||||
, const bool select_difficulty
|
||||
, const std::string& difficulty)
|
||||
, const std::string& difficulty
|
||||
, bool skip_version_check)
|
||||
{
|
||||
filename_ = filename;
|
||||
difficulty_ = difficulty;
|
||||
@ -256,6 +257,10 @@ bool loadgame::load_game(
|
||||
gamestate_.classification() = game_classification(load_config_);
|
||||
#endif
|
||||
|
||||
if (skip_version_check) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return check_version_compatibility();
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,8 @@ public:
|
||||
, const bool show_replay
|
||||
, const bool cancel_orders
|
||||
, const bool select_difficulty
|
||||
, const std::string& difficulty);
|
||||
, const std::string& difficulty
|
||||
, bool skip_version_check);
|
||||
/** Loading a game from within the multiplayer-create dialog. */
|
||||
bool load_multiplayer_game();
|
||||
/** Generate the gamestate out of the loaded game config. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user