# HG changeset patch # User rubidium # Date 1198972188 0 # Node ID 5113b6256c4218cfdd26f1bcd73f510cf6e681f9 # Parent 83dc418497a90461a4e9aefd02e020765762f361 (svn r11721) -Fix: do not disable NewGRFs for 'eternity' during games. diff -r 83dc418497a9 -r 5113b6256c42 src/newgrf.cpp --- a/src/newgrf.cpp Sat Dec 29 21:06:54 2007 +0000 +++ b/src/newgrf.cpp Sat Dec 29 23:49:48 2007 +0000 @@ -5607,6 +5607,17 @@ ResetNewGRFData(); + /* + * Reset the status of all files, so we can 'retry' to load them. + * This is needed when one for example rearranges the NewGRFs in-game + * and a previously disabled NewGRF becomes useable. If it would not + * be reset, the NewGRF would remain disabled even though it should + * have been enabled. + */ + for (GRFConfig *c = _grfconfig; c != NULL; c = c->next) { + if (c->status != GCS_NOT_FOUND) c->status = GCS_UNKNOWN; + } + /* Load newgrf sprites * in each loading stage, (try to) open each file specified in the config * and load information from it. */