Mercurial > hg > openttd
diff src/station_cmd.cpp @ 7864:dee7f1c1a1e2 draft
(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.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 11 Nov 2007 20:24:32 +0000 |
parents | 707c26c48f4e |
children | 202a48f69a30 |
line wrap: on
line diff
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1042,7 +1042,9 @@ 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); }