diff options
author | truelight <truelight@openttd.org> | 2007-09-13 22:48:11 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-09-13 22:48:11 +0000 |
commit | c6c313991488c9276e7b87495be36dc3b7f9501e (patch) | |
tree | 73a562308f4a717ca6dc2705b64de89e4860f21a | |
parent | e994f3195ae5d4f3dde0d4b32b86cf4ff8029104 (diff) | |
download | openttd-c6c313991488c9276e7b87495be36dc3b7f9501e.tar.xz |
(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)
-rw-r--r-- | src/spritecache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spritecache.cpp b/src/spritecache.cpp index fb8e684d3..81932e86c 100644 --- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -121,7 +121,7 @@ bool SpriteExists(SpriteID id) /* 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); |