Skip non-Object tiles in UpdateObjectColours
This commit is contained in:
@@ -174,6 +174,8 @@ void UpdateCompanyHQ(TileIndex tile, uint score)
|
|||||||
void UpdateObjectColours(const Company *c)
|
void UpdateObjectColours(const Company *c)
|
||||||
{
|
{
|
||||||
for (Object *obj : Object::Iterate()) {
|
for (Object *obj : Object::Iterate()) {
|
||||||
|
if (!IsTileType(obj->location.tile, MP_OBJECT)) continue;
|
||||||
|
|
||||||
Owner owner = GetTileOwner(obj->location.tile);
|
Owner owner = GetTileOwner(obj->location.tile);
|
||||||
/* Not the current owner, so colour doesn't change. */
|
/* Not the current owner, so colour doesn't change. */
|
||||||
if (owner != c->index) continue;
|
if (owner != c->index) continue;
|
||||||
|
Reference in New Issue
Block a user