1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-28 14:44:28 +01:00

Fix #15166: foundations missing adjacent to NewGRF objects without foundation

This commit is contained in:
Rubidium
2026-01-25 13:33:40 +01:00
committed by rubidium42
parent 70404850e2
commit 98f27ed83c

View File

@@ -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);
}
/**