(svn r9758) -Fix (FS#756): Ignore bit 1 (axis) of station tile layouts
authorpeter1138
Tue, 01 May 2007 06:43:18 +0000
changeset 7052 580522971dfa
parent 7051 d0e0ab1460f0
child 7053 e14047c5a8d0
(svn r9758) -Fix (FS#756): Ignore bit 1 (axis) of station tile layouts
src/station_cmd.cpp
--- a/src/station_cmd.cpp	Mon Apr 30 20:05:31 2007 +0000
+++ b/src/station_cmd.cpp	Tue May 01 06:43:18 2007 +0000
@@ -935,7 +935,7 @@
 			int w = plat_len;
 			do {
 				byte layout = *layout_ptr++;
-				MakeRailStation(tile, st->owner, st->index, axis, layout, (RailType)GB(p2, 0, 4));
+				MakeRailStation(tile, st->owner, st->index, axis, layout & ~1, (RailType)GB(p2, 0, 4));
 				SetCustomStationSpecIndex(tile, specindex);
 				SetStationTileRandomBits(tile, GB(Random(), 0, 4));
 
@@ -943,7 +943,7 @@
 					/* 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 + axis);
+					if (callback != CALLBACK_FAILED && callback < 8) SetStationGfx(tile, (callback & ~1) + axis);
 				}
 
 				tile += tile_delta;