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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user