Skip non-Object tiles in UpdateObjectColours

pull/140/head
Jonathan G Rennison 4 years ago
parent d210bc4d14
commit dc4bd3a0be

@ -174,6 +174,8 @@ void UpdateCompanyHQ(TileIndex tile, uint score)
void UpdateObjectColours(const Company *c)
{
for (Object *obj : Object::Iterate()) {
if (!IsTileType(obj->location.tile, MP_OBJECT)) continue;
Owner owner = GetTileOwner(obj->location.tile);
/* Not the current owner, so colour doesn't change. */
if (owner != c->index) continue;

Loading…
Cancel
Save