changeset 5476:46d04f681e6d draft

(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.
author peter1138 <peter1138@openttd.org>
date Tue, 02 Jan 2007 20:00:10 +0000
parents eabf4b86aed6
children eabd0511ec33
files src/newgrf.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf.c
+++ b/src/newgrf.c
@@ -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);
+			}
 		}
 	}