summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-09-18 18:02:33 +0000
committerpeter1138 <peter1138@openttd.org>2006-09-18 18:02:33 +0000
commit5ba5efdf6e08bbb82db2441f6b9ce9f1191b79d5 (patch)
tree2a753ff84a11996923ac89a323ae4f9dba355ac2 /station_cmd.c
parent7d65f7b9371d72addc950527c53824ae8f66e503 (diff)
downloadopenttd-5ba5efdf6e08bbb82db2441f6b9ce9f1191b79d5.tar.xz
(svn r6477) - Fix a loop-hole that allowed docks to be built regardless of town authority rating.
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 87722d195..b9a479235 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -1918,6 +1918,8 @@ int32 CmdBuildDock(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
default: return_cmd_error(STR_304B_SITE_UNSUITABLE);
}
+ if (!(flags & DC_NO_TOWN_RATING) && !CheckIfAuthorityAllows(tile)) return CMD_ERROR;
+
if (!EnsureNoVehicle(tile)) return CMD_ERROR;
cost = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);