From 2347c45d35e483c5ab1431c35e504c0514136bf9 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 28 May 2007 03:41:18 +0000 Subject: (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 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 2528dc05d..ef52fcfad 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -300,6 +300,12 @@ int32 CmdBuildSingleRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) 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 -- cgit v1.2.3-70-g09d2