(svn r6477) - Fix a loop-hole that allowed docks to be built regardless of town authority rating.
authorpeter1138
Mon, 18 Sep 2006 18:02:33 +0000
changeset 4619 fc11bc6a7fe7
parent 4618 9fa09a3e653a
child 4620 9b9649071d46
(svn r6477) - Fix a loop-hole that allowed docks to be built regardless of town authority rating.
station_cmd.c
--- a/station_cmd.c	Mon Sep 18 08:39:03 2006 +0000
+++ b/station_cmd.c	Mon Sep 18 18:02:33 2006 +0000
@@ -1918,6 +1918,8 @@
 		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);