diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index e1d9838518..c9492f20eb 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -449,7 +449,7 @@ static void DrawTile_Object(TileInfo *ti) /* Fall back for when the object doesn't exist anymore. */ if (!spec->IsEnabled()) type = OBJECT_TRANSMITTER; - if (!spec->flags.Test(ObjectFlag::HasNoFoundation)) DrawFoundation(ti, GetFoundation_Object(ti->tile, ti->tileh)); + DrawFoundation(ti, GetFoundation_Object(ti->tile, ti->tileh)); if (type < NEW_OBJECT_OFFSET) { const DrawTileSprites *dts = nullptr; @@ -502,7 +502,8 @@ static int GetSlopePixelZ_Object(TileIndex tile, uint x, uint y, bool) static Foundation GetFoundation_Object(TileIndex tile, Slope tileh) { - return IsObjectType(tile, OBJECT_OWNED_LAND) ? FOUNDATION_NONE : FlatteningFoundation(tileh); + const ObjectSpec *spec = ObjectSpec::Get(GetObjectType(tile)); + return spec->IsEnabled() && spec->flags.Test(ObjectFlag::HasNoFoundation) ? FOUNDATION_NONE : FlatteningFoundation(tileh); } /**