Codechange: explicitly initialise Company member variables

This commit is contained in:
Rubidium
2025-02-17 20:34:07 +01:00
committed by rubidium42
parent 8b7c92dfe3
commit 24a7cde9cc
9 changed files with 79 additions and 86 deletions

View File

@@ -2550,7 +2550,7 @@ bool AfterLoadGame()
if (IsSavegameVersionBefore(SLV_148)) {
for (Object *o : Object::Iterate()) {
Owner owner = GetTileOwner(o->location.tile);
o->colour = (owner == OWNER_NONE) ? static_cast<Colours>(GB(Random(), 0, 4)) : Company::Get(owner)->livery->colour1;
o->colour = (owner == OWNER_NONE) ? static_cast<Colours>(GB(Random(), 0, 4)) : Company::Get(owner)->livery[0].colour1;
}
}