Codechange: move calculating livery recolour offset to Livery

This commit is contained in:
Rubidium
2026-04-17 21:16:51 +02:00
committed by rubidium42
parent e24f92ce82
commit 9a87f184c4
4 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -506,7 +506,7 @@ void DrawNewObjectTileInGUI(int x, int y, const ObjectSpec *spec, uint8_t view)
/* Get the colours of our company! */
if (spec->flags.Test(ObjectFlag::Uses2CC)) {
const Livery &l = Company::Get(_local_company)->livery[0];
palette = SPR_2CCMAP_BASE + l.colour1 + l.colour2 * 16;
palette = SPR_2CCMAP_BASE + l.GetRecolourOffset();
} else {
palette = GetCompanyPalette(_local_company);
}