(svn r11191) -Fix [FS#1227]: GLS_ACTIVATION stage must be done immediatly after GLS_RESERVE stage, before the GLS_RESERVE stage for the next newgrf.
authorglx
Mon, 01 Oct 2007 18:59:25 +0000
changeset 7660 ce99f31266a9
parent 7659 c86da4c6292f
child 7661 3c1f788966ec
(svn r11191) -Fix [FS#1227]: GLS_ACTIVATION stage must be done immediatly after GLS_RESERVE stage, before the GLS_RESERVE stage for the next newgrf.
src/newgrf.cpp
--- a/src/newgrf.cpp	Sun Sep 30 19:33:40 2007 +0000
+++ b/src/newgrf.cpp	Mon Oct 01 18:59:25 2007 +0000
@@ -5495,7 +5495,7 @@
 	/* Load newgrf sprites
 	 * in each loading stage, (try to) open each file specified in the config
 	 * and load information from it. */
-	for (GrfLoadingStage stage = GLS_LABELSCAN; stage <= GLS_ACTIVATION; stage++) {
+	for (GrfLoadingStage stage = GLS_LABELSCAN; stage < GLS_ACTIVATION; stage++) {
 		uint slot = file_index;
 
 		_cur_stage = stage;
@@ -5511,7 +5511,7 @@
 			LoadNewGRFFile(c, slot++, stage);
 			if (stage == GLS_RESERVE) {
 				if (c->status == GCS_ACTIVATED) c->status = GCS_INITIALISED;
-			} else if (stage == GLS_ACTIVATION) {
+				LoadNewGRFFile(c, slot++, GLS_ACTIVATION);
 				ClearTemporaryNewGRFData();
 				BuildCargoTranslationMap();
 				DEBUG(sprite, 2, "LoadNewGRF: Currently %i sprites are loaded", _cur_spriteid);