summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-11-11 20:24:32 +0000
committerrubidium <rubidium@openttd.org>2007-11-11 20:24:32 +0000
commit084ede9dcadcb2ebe75de15f95eec778c345d241 (patch)
tree96cfd6d9381590317bb093d3714fb24e3096e92c /src/station_cmd.cpp
parent8844bd6cded02f00149034eccd122811f5c4a1e9 (diff)
downloadopenttd-084ede9dcadcb2ebe75de15f95eec778c345d241.tar.xz
(svn r11414) -Fix [FS#1387]: when building a station, even though we already 'know' it in memory, it should still be unknown in the realm of callbacks.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index edb8876b4..45ee5faf6 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1042,7 +1042,9 @@ CommandCost CmdBuildRailroadStation(TileIndex tile_org, uint32 flags, uint32 p1,
if (statspec != NULL) {
/* 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);
+
+ /* As the station is not yet completely finished, the station does not yet exist. */
+ uint16 callback = GetStationCallback(CBID_STATION_TILE_LAYOUT, platinfo, 0, statspec, NULL, tile);
if (callback != CALLBACK_FAILED && callback < 8) SetStationGfx(tile, (callback & ~1) + axis);
}