summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-11-11 12:34:44 +0000
committertruelight <truelight@openttd.org>2007-11-11 12:34:44 +0000
commit8b3e27889784eaae5989ad0271c80b05b94edf46 (patch)
tree51f2c720480f1f4ac394177cbcecc18027d93e51 /src/station_cmd.cpp
parentfe24593692bc6560dffca1d33db98f1a3bec805a (diff)
downloadopenttd-8b3e27889784eaae5989ad0271c80b05b94edf46.tar.xz
(svn r11407) -Fix: do not allow building of tram-tracks when they are not available (SmatZ)
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index dcf3f1f53..edb8876b4 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1318,7 +1318,7 @@ CommandCost CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
bool town_owned_road = build_over_road && IsTileOwner(tile, OWNER_TOWN);
RoadTypes rts = (RoadTypes)GB(p2, 2, 3);
- if (rts == ROADTYPES_NONE || HASBIT(rts, ROADTYPE_HWAY)) return CMD_ERROR;
+ if (!AreValidRoadTypes(rts) || !HasRoadTypesAvail(_current_player, rts)) return CMD_ERROR;
/* Trams only have drive through stops */
if (!is_drive_through && HASBIT(rts, ROADTYPE_TRAM)) return CMD_ERROR;