(svn r8634) -Codechange: replace missing sprites with a red question mark.
authorrubidium
Thu, 08 Feb 2007 14:02:12 +0000
changeset 6213 164d84e1c5b4
parent 6212 39deaa03d180
child 6214 aab08beb5652
(svn r8634) -Codechange: replace missing sprites with a red question mark.
src/spritecache.cpp
--- a/src/spritecache.cpp	Thu Feb 08 12:54:23 2007 +0000
+++ b/src/spritecache.cpp	Thu Feb 08 14:02:12 2007 +0000
@@ -123,11 +123,11 @@
 	DEBUG(sprite, 9, "Load sprite %d", id);
 
 	if (!SpriteExists(id)) {
-		error(
-			"Tried to load non-existing sprite #%d.\n"
-			"Probable cause: Wrong/missing NewGRFs",
-			id
-		);
+		DEBUG(sprite, 1, "Tried to load non-existing sprite #%d. Probable cause: Wrong/missing NewGRFs", id);
+
+		/* SPR_IMG_QUERY is a BIG FAT RED ? */
+		id = SPR_IMG_QUERY;
+		sc = GetSpriteCache(SPR_IMG_QUERY);
 	}
 
 	FioSeekToFile(sc->file_pos);