summaryrefslogtreecommitdiff
path: root/rail_cmd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-06 20:33:22 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-06 20:33:22 +0000
commitf689b2087469851b0db826d5d82c6892565cbff6 (patch)
tree3e95909577865aa683688e9760e70991a2347b18 /rail_cmd.c
parent5c94fd7afa166551a4ceee4df657c561f2ba957c (diff)
downloadopenttd-f689b2087469851b0db826d5d82c6892565cbff6.tar.xz
(svn r4754) - Newstations: expose default station display data via a function so we can use it (rarely) in other places.
Diffstat (limited to 'rail_cmd.c')
-rw-r--r--rail_cmd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/rail_cmd.c b/rail_cmd.c
index 107b5bc17..f88267841 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -1336,7 +1336,12 @@ static void DrawTile_Track(TileInfo *ti)
if (callback != CALLBACK_FAILED) tile = callback;
}
- cust = &statspec->renderdata[(tile < statspec->tiles ? tile : 0) + GetWaypointAxis(ti->tile)];
+ if (statspec->renderdata == NULL) {
+ cust = GetStationTileLayout(tile);
+ relocation -= 0x42D;
+ } else {
+ cust = &statspec->renderdata[(tile < statspec->tiles ? tile : 0) + GetWaypointAxis(ti->tile)];
+ }
/* If there is no sprite layout, we fall back to the default waypoint graphics. */
if (cust != NULL && cust->seq != NULL) {