summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_station.cpp2
-rw-r--r--src/station_cmd.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index 301ab493c..52631ad87 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -630,7 +630,7 @@ SpriteID GetCustomStationRelocation(const StationSpec *statspec, BaseStation *st
* @param tile Station tile being drawn
* @param layout Spritelayout as returned by previous callback
* @param edge_info Information about northern tile edges; whether they need foundations or merge into adjacent tile's foundations.
- * @return First sprite of a set of foundation sprites for various slopes.
+ * @return First sprite of a set of foundation sprites for various slopes, or 0 if default foundations shall be drawn.
*/
SpriteID GetCustomStationFoundationRelocation(const StationSpec *statspec, BaseStation *st, TileIndex tile, uint layout, uint edge_info)
{
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index b7725b459..cff06e580 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2652,6 +2652,7 @@ static void DrawTile_Station(TileInfo *ti)
if (!HasFoundationNW(ti->tile, slope, z)) SetBit(edge_info, 0);
if (!HasFoundationNE(ti->tile, slope, z)) SetBit(edge_info, 1);
SpriteID image = GetCustomStationFoundationRelocation(statspec, st, ti->tile, tile_layout, edge_info);
+ if (image == 0) goto draw_default_foundation;
if (HasBit(statspec->flags, SSF_EXTENDED_FOUNDATIONS)) {
/* Station provides extended foundations. */