1
0
Fork 0

Fix 5664b1e2f6: Missing sprite detection used the wrong filename. (#13421)

This caused the missing sprite count to be incorrect.
pull/13425/head
Peter Nelson 2025-01-31 22:28:38 +00:00 committed by GitHub
parent 4e82091f92
commit f67589d96e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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.