(svn r9960) -Fix [FS#813]: road wasn't properly added when overbuilding a tram rails with normal rails to for a crossing.
authorrubidium
Mon, 28 May 2007 03:41:18 +0000
changeset 7224 31699d7486ed
parent 7223 485af472c2f0
child 7225 e83351234693
(svn r9960) -Fix [FS#813]: road wasn't properly added when overbuilding a tram rails with normal rails to for a crossing.
src/rail_cmd.cpp
--- a/src/rail_cmd.cpp	Sun May 27 17:27:07 2007 +0000
+++ b/src/rail_cmd.cpp	Mon May 28 03:41:18 2007 +0000
@@ -300,6 +300,12 @@
 				RoadBits tram = GetRoadBits(tile, ROADTYPE_TRAM);
 				switch (roadtypes) {
 					default: break;
+					case ROADTYPES_TRAM:
+						/* Tram crossings must always have road. */
+						SetRoadOwner(tile, ROADTYPE_ROAD, _current_player);
+						roadtypes |= ROADTYPES_ROAD;
+						break;
+
 					case ROADTYPES_ROADTRAM: if (road == tram) break;
 						/* FALL THROUGH */
 					case ROADTYPES_ROADHWAY: // Road and highway are incompatible in this case