summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-08 06:22:01 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-08 06:22:01 +0000
commit5f2257e13c741da0fdc8691e992f8d4c47f56cec (patch)
tree502a875daa4af9b6da13db3a592d0bf66925326e
parenta56ef34f8d715bced7a39f2f979aa4f8f0c24515 (diff)
downloadopenttd-5f2257e13c741da0fdc8691e992f8d4c47f56cec.tar.xz
(svn r4780) - Newstations: when building using a dynamic layout, add the station axis to the returned tile type. Also supply correct parameters to var 10.
-rw-r--r--station_cmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 788dc5d5c..e9910b8cd 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -1105,9 +1105,10 @@ int32 CmdBuildRailroadStation(TileIndex tile_org, uint32 flags, uint32 p1, uint3
SetStationTileRandomBits(tile, GB(Random(), 0, 4));
if (statspec != NULL) {
- uint32 platinfo = GetPlatformInfo(axis, layout, plat_len, numtracks_orig, plat_len - w, numtracks_orig - numtracks, false);
+ /* Use a fixed axis for GetPlatformInfo as our platforms / numtracks are always the right way around */
+ uint32 platinfo = GetPlatformInfo(AXIS_X, 0, plat_len, numtracks_orig, plat_len - w, numtracks_orig - numtracks, false);
uint16 callback = GetStationCallback(CBID_STATION_TILE_LAYOUT, platinfo, 0, statspec, st, tile);
- if (callback != CALLBACK_FAILED && callback < 8) SetStationGfx(tile, callback);
+ if (callback != CALLBACK_FAILED && callback < 8) SetStationGfx(tile, callback + axis);
}
tile += tile_delta;