(svn r11101) -Fix r11099: the check: file_pos == 0, no longer works; adjust the check with file_slot. This solves the ? sprites with autorail (nice catch Progman)
authortruelight
Thu, 13 Sep 2007 22:48:11 +0000
changeset 8072 417f041eaee8
parent 8071 8b1f7fbbe3f2
child 8073 42007d9c81bb
(svn r11101) -Fix r11099: the check: file_pos == 0, no longer works; adjust the check with file_slot. This solves the ? sprites with autorail (nice catch Progman)
src/spritecache.cpp
--- a/src/spritecache.cpp	Thu Sep 13 18:50:42 2007 +0000
+++ b/src/spritecache.cpp	Thu Sep 13 22:48:11 2007 +0000
@@ -121,7 +121,7 @@
 	/* Special case for Sprite ID zero -- its position is also 0... */
 	if (id == 0) return true;
 	if (id >= _spritecache_items) return false;
-	return GetSpriteCache(id)->file_pos != 0;
+	return !(GetSpriteCache(id)->file_pos == 0 && GetSpriteCache(id)->file_slot == 0);
 }
 
 void* AllocSprite(size_t);