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
commiteadc44d8cb30d364fbd71dc5c0d664a3f98069c6 (patch)
tree7fee277d995f221f5003a759c831f602e8b0a669 /src
parentd07b57f9aae88fee6ce89978cbf7aae2c4497dac (diff)
downloadopenttd-eadc44d8cb30d364fbd71dc5c0d664a3f98069c6.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