(svn r7496) -Codechange: [NewGRF] Skip processing a GRF if it deactivated itself.
authorpeter1138
Thu, 14 Dec 2006 19:10:46 +0000
changeset 5334 12140f2008c8
parent 5333 8e7d68b06399
child 5335 5d419c6bb906
(svn r7496) -Codechange: [NewGRF] Skip processing a GRF if it deactivated itself.
newgrf.c
--- a/newgrf.c	Thu Dec 14 15:14:29 2006 +0000
+++ b/newgrf.c	Thu Dec 14 19:10:46 2006 +0000
@@ -2957,6 +2957,9 @@
 			grfmsg(GMS_NOTICE, "GRFInhibit: Deactivating file ``%s''", file->filename);
 			SETBIT(file->flags, GCF_DISABLED);
 			CLRBIT(file->flags, GCF_ACTIVATED);
+
+			/* Skip processing if the GRF deactivated itself */
+			if (file == _cur_grfconfig) _skip_sprites = -1;
 		}
 	}
 }