summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-01-31 12:04:40 +0000
committerdarkvater <darkvater@openttd.org>2005-01-31 12:04:40 +0000
commit35cb4fbf8c704fba0609073281db337318100f4b (patch)
tree14b6cce5eeaaf54b1a3ac977f935566c3487c42f
parentb344d307921c77b7f2d3c82e7659efb5f9acea61 (diff)
downloadopenttd-35cb4fbf8c704fba0609073281db337318100f4b.tar.xz
(svn r1754) - Fix: you can once again load newgrf files with lots of sprites. Index wasn't reset in second run, thus counting them double.
-rw-r--r--spritecache.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/spritecache.c b/spritecache.c
index 85a09e940..2ab89f4ff 100644
--- a/spritecache.c
+++ b/spritecache.c
@@ -896,6 +896,7 @@ static void LoadSpriteTables(void)
// in each loading stage, (try to) open each file specified in the config and load information from it.
_custom_sprites_base = load_index;
for (_loading_stage = 0; _loading_stage < 2; _loading_stage++) {
+ load_index = _custom_sprites_base;
for (j = 0; j != lengthof(_newgrf_files) && _newgrf_files[j]; j++) {
if ( !FiosCheckFileExists(_newgrf_files[j]) )
continue;