Changeset - r7864:2d8294686628
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-11-11 20:24:32
rubidium@openttd.org
(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.
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -1039,13 +1039,15 @@ CommandCost CmdBuildRailroadStation(Tile
 
				SetCustomStationSpecIndex(tile, specindex);
 
				SetStationTileRandomBits(tile, GB(Random(), 0, 4));
 

	
 
				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);
 
				}
 

	
 
				tile += tile_delta;
 
			} while (--w);
 
			SetSignalsOnBothDir(tile_org, track);
0 comments (0 inline, 0 general)