mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r2926) -Fix: Use the same file slots in both initialisation stages when loading a patch grf
This commit is contained in:
parent
5d3f87bcd8
commit
4b59946ffe
3
newgrf.c
3
newgrf.c
@ -2327,6 +2327,7 @@ void LoadNewGRF(uint load_index, uint file_index)
|
|||||||
* and load information from it. */
|
* and load information from it. */
|
||||||
_custom_sprites_base = load_index;
|
_custom_sprites_base = load_index;
|
||||||
for (stage = 0; stage < 2; stage++) {
|
for (stage = 0; stage < 2; stage++) {
|
||||||
|
uint slot = file_index;
|
||||||
uint j;
|
uint j;
|
||||||
|
|
||||||
_cur_stage = stage;
|
_cur_stage = stage;
|
||||||
@ -2337,7 +2338,7 @@ void LoadNewGRF(uint load_index, uint file_index)
|
|||||||
error("NewGRF file missing: %s", _newgrf_files[j]);
|
error("NewGRF file missing: %s", _newgrf_files[j]);
|
||||||
}
|
}
|
||||||
if (stage == 0) InitNewGRFFile(_newgrf_files[j], _cur_spriteid);
|
if (stage == 0) InitNewGRFFile(_newgrf_files[j], _cur_spriteid);
|
||||||
LoadNewGRFFile(_newgrf_files[j], file_index++, stage); // XXX different file indices in both stages?
|
LoadNewGRFFile(_newgrf_files[j], slot++, stage);
|
||||||
DEBUG(spritecache, 2) ("Currently %i sprites are loaded", load_index);
|
DEBUG(spritecache, 2) ("Currently %i sprites are loaded", load_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user