(svn r7645) [cbh] - Fix: In r7643, I broke the building of new bridges because I forgot to change the map-accessors. repair this custombridgeheads
authorcelestar
Sat, 30 Dec 2006 12:49:54 +0000
branchcustombridgeheads
changeset 5600 bac9ab186cab
parent 5599 a18b0c2587f7
child 5601 51f241d43769
(svn r7645) [cbh] - Fix: In r7643, I broke the building of new bridges because I forgot to change the map-accessors. repair this
bridge_map.h
--- a/bridge_map.h	Sat Dec 30 12:05:05 2006 +0000
+++ b/bridge_map.h	Sat Dec 30 12:49:54 2006 +0000
@@ -139,8 +139,8 @@
 {
 	SetTileOwner(t, o);
 	_m[t].m2 = bridgetype << 4;
-	_m[t].m4 = 0;
-	_m[t].m5 = d;
+	_m[t].m4 = d << 5;
+	_m[t].m5 = 0;
 }
 
 static inline void MakeRoadBridgeRamp(TileIndex t, Owner o, uint bridgetype, DiagDirection d)
@@ -155,6 +155,7 @@
 	MakeBridgeRamp(t, o, bridgetype, d, TRANSPORT_RAIL);
 	SetTileType(t, MP_RAILWAY_BRIDGE);
 	_m[t].m3 = r;
+	_m[t].m5 = DiagDirToAxis(d) == AXIS_X ? TRACK_BIT_X : TRACK_BIT_Y;
 }