Skip GRF compatibility check when using -K/-q switches
This commit is contained in:
@@ -41,6 +41,7 @@ struct LoadCheckData {
|
|||||||
CompanyPropertiesMap companies; ///< Company information.
|
CompanyPropertiesMap companies; ///< Company information.
|
||||||
|
|
||||||
GRFConfig *grfconfig; ///< NewGrf configuration from save.
|
GRFConfig *grfconfig; ///< NewGrf configuration from save.
|
||||||
|
bool want_grf_compatibility = true;
|
||||||
GRFListCompatibility grf_compatibility; ///< Summary state of NewGrfs, whether missing files or only compatible found.
|
GRFListCompatibility grf_compatibility; ///< Summary state of NewGrfs, whether missing files or only compatible found.
|
||||||
|
|
||||||
struct LoggedAction *gamelog_action; ///< Gamelog actions
|
struct LoggedAction *gamelog_action; ///< Gamelog actions
|
||||||
|
@@ -786,6 +786,7 @@ int openttd_main(int argc, char *argv[])
|
|||||||
|
|
||||||
_load_check_data.Clear();
|
_load_check_data.Clear();
|
||||||
if (i == 'K') _load_check_data.want_debug_data = true;
|
if (i == 'K') _load_check_data.want_debug_data = true;
|
||||||
|
_load_check_data.want_grf_compatibility = false;
|
||||||
SaveOrLoadResult res = SaveOrLoad(mgo.opt, SLO_CHECK, DFT_GAME_FILE, SAVE_DIR, false);
|
SaveOrLoadResult res = SaveOrLoad(mgo.opt, SLO_CHECK, DFT_GAME_FILE, SAVE_DIR, false);
|
||||||
if (res != SL_OK || _load_check_data.HasErrors()) {
|
if (res != SL_OK || _load_check_data.HasErrors()) {
|
||||||
fprintf(stderr, "Failed to open savegame\n");
|
fprintf(stderr, "Failed to open savegame\n");
|
||||||
|
@@ -3290,7 +3290,7 @@ static SaveOrLoadResult DoLoad(LoadFilter *reader, bool load_check)
|
|||||||
|
|
||||||
if (load_check) {
|
if (load_check) {
|
||||||
/* The only part from AfterLoadGame() we need */
|
/* The only part from AfterLoadGame() we need */
|
||||||
_load_check_data.grf_compatibility = IsGoodGRFConfigList(_load_check_data.grfconfig);
|
if (_load_check_data.want_grf_compatibility) _load_check_data.grf_compatibility = IsGoodGRFConfigList(_load_check_data.grfconfig);
|
||||||
} else {
|
} else {
|
||||||
GamelogStartAction(GLAT_LOAD);
|
GamelogStartAction(GLAT_LOAD);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user