Skip GRF compatibility check when using -K/-q switches

pull/192/head
Jonathan G Rennison 4 years ago
parent 5db169b76f
commit e2de103d82

@ -41,6 +41,7 @@ struct LoadCheckData {
CompanyPropertiesMap companies; ///< Company information.
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.
struct LoggedAction *gamelog_action; ///< Gamelog actions

@ -786,6 +786,7 @@ int openttd_main(int argc, char *argv[])
_load_check_data.Clear();
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);
if (res != SL_OK || _load_check_data.HasErrors()) {
fprintf(stderr, "Failed to open savegame\n");

@ -3290,7 +3290,7 @@ static SaveOrLoadResult DoLoad(LoadFilter *reader, bool load_check)
if (load_check) {
/* 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 {
GamelogStartAction(GLAT_LOAD);

Loading…
Cancel
Save