1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-17 03:29:09 +00:00

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

This caused the missing sprite count to be incorrect.
This commit is contained in:
2025-01-31 22:28:38 +00:00
committed by GitHub
parent 4e82091f92
commit f67589d96e

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.