(svn r19971) -Codechange: Make IsGoodGRFConfigList() operate on any given GRFConfig and move the GameLog operations directly to AfterLoad().

This commit is contained in:
frosch
2010-06-13 14:07:49 +00:00
parent 1fd5333070
commit 54a7c3243e
3 changed files with 13 additions and 7 deletions

View File

@@ -546,7 +546,15 @@ bool AfterLoadGame()
if (_settings_game.vehicle.road_side) _settings_game.vehicle.road_side = 1;
/* Check if all NewGRFs are present, we are very strict in MP mode */
GRFListCompatibility gcf_res = IsGoodGRFConfigList();
GRFListCompatibility gcf_res = IsGoodGRFConfigList(_grfconfig);
for (GRFConfig *c = _grfconfig; c != NULL; c = c->next) {
if (c->status == GCS_NOT_FOUND) {
GamelogGRFRemove(c->ident.grfid);
} else if (HasBit(c->flags, GCF_COMPATIBLE)) {
GamelogGRFCompatible(&c->ident);
}
}
if (_networking && gcf_res != GLC_ALL_GOOD) {
SetSaveLoadError(STR_NETWORK_ERROR_CLIENT_NEWGRF_MISMATCH);
/* Restore the signals */