From dc4bd3a0be53fea8344032248bfd1b6b890b6548 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 3 Apr 2020 23:57:34 +0100 Subject: [PATCH] Skip non-Object tiles in UpdateObjectColours --- src/object_cmd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index 75d15e56ee..0b8f733eb9 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -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;