(svn r7760) -Codechange: Debug messages for newgrf showed the starting sprite, not the current sprite index. Also only output the debug message during activation, when sprites are loaded.
authorpeter1138
Tue, 02 Jan 2007 20:00:10 +0000
changeset 5476 fa6583f537ce
parent 5475 2e6990a8c7c4
child 5477 3e7cf46bf3b8
(svn r7760) -Codechange: Debug messages for newgrf showed the starting sprite, not the current sprite index. Also only output the debug message during activation, when sprites are loaded.
src/newgrf.c
--- a/src/newgrf.c	Tue Jan 02 19:19:48 2007 +0000
+++ b/src/newgrf.c	Tue Jan 02 20:00:10 2007 +0000
@@ -3682,8 +3682,10 @@
 
 			if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid);
 			LoadNewGRFFile(c, slot++, stage);
-			if (stage == GLS_ACTIVATION) ClearTemporaryNewGRFData();
-			DEBUG(sprite, 2, "Currently %i sprites are loaded", load_index);
+			if (stage == GLS_ACTIVATION) {
+				ClearTemporaryNewGRFData();
+				DEBUG(sprite, 2, "Currently %i sprites are loaded", _cur_spriteid);
+			}
 		}
 	}