Changeset - r20777:b54dc2a3f6fb
[Not reviewed]
master
0 1 0
frosch - 11 years ago 2013-10-06 19:40:40
frosch@openttd.org
(svn r25821) -Fix-ish: Sprite 0 was considered available, even if no baseset was loaded.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/spritecache.cpp
Show inline comments
 
@@ -118,9 +118,10 @@ bool SkipSpriteData(byte type, uint16 nu
 
/* Check if the given Sprite ID exists */
 
bool SpriteExists(SpriteID id)
 
{
 
	if (id >= _spritecache_items) return false;
 

	
 
	/* 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 && GetSpriteCache(id)->file_slot == 0);
 
}
 

	
0 comments (0 inline, 0 general)