summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-28 03:41:18 +0000
committerrubidium <rubidium@openttd.org>2007-05-28 03:41:18 +0000
commit2347c45d35e483c5ab1431c35e504c0514136bf9 (patch)
tree7fee277d995f221f5003a759c831f602e8b0a669 /src
parent710cc5a5979e76d84ef598483ebdba62963d75e9 (diff)
downloadopenttd-2347c45d35e483c5ab1431c35e504c0514136bf9.tar.xz
(svn r9960) -Fix [FS#813]: road wasn't properly added when overbuilding a tram rails with normal rails to for a crossing.
Diffstat (limited to 'src')
-rw-r--r--src/rail_cmd.cpp6
1 files changed, 6 insertions, 0 deletions
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