1
0
Fork 0

Fix 5664b1e2f6: Missing sprite detection used the wrong filename.

This caused the missing sprite count to be incorrect.
pull/13421/head
Peter Nelson 2025-01-31 21:32:22 +00:00
parent f8b1e3033f
commit 8d68afee5f
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ static void LoadSpriteTables()
auto default_extra = GetDefaultExtraGRFConfig();
auto baseset_extra = GetBasesetExtraGRFConfig();
std::string baseset_filename = baseset_extra->filename;
std::string default_filename = default_extra->filename;
_grfconfig.insert(std::begin(_grfconfig), std::move(default_extra));
_grfconfig.insert(std::next(std::begin(_grfconfig)), std::move(baseset_extra));
@ -217,7 +217,7 @@ static void LoadSpriteTables()
uint total_extra_graphics = SPR_NEWGRFS_BASE - SPR_OPENTTD_BASE;
Debug(sprite, 4, "Checking sprites from fallback grf");
_missing_extra_graphics = GetSpriteCountForFile(baseset_filename, SPR_OPENTTD_BASE, SPR_NEWGRFS_BASE);
_missing_extra_graphics = GetSpriteCountForFile(default_filename, SPR_OPENTTD_BASE, SPR_NEWGRFS_BASE);
Debug(sprite, 1, "{} extra sprites, {} from baseset, {} from fallback", total_extra_graphics, total_extra_graphics - _missing_extra_graphics, _missing_extra_graphics);
/* The original baseset extra graphics intentionally make use of the fallback graphics.