summaryrefslogtreecommitdiff
path: root/src/waypoint_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-08-20 12:50:59 +0000
committerfrosch <frosch@openttd.org>2010-08-20 12:50:59 +0000
commit03ab15893590a53616e2d5f01570317c4fd20866 (patch)
tree7f3bf5fe95ac74839553ae6e39183310935d6a86 /src/waypoint_cmd.cpp
parentde973a4d60ee2faf996a61a210e72d05f93640e2 (diff)
downloadopenttd-03ab15893590a53616e2d5f01570317c4fd20866.tar.xz
(svn r20579) -Change (r1579): Allow removing of buoys if they are only used by own vehicles.
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r--src/waypoint_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp
index 4d2520c25..9a0954aef 100644
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -333,7 +333,7 @@ CommandCost RemoveBuoy(TileIndex tile, DoCommandFlag flags)
Waypoint *wp = Waypoint::GetByTile(tile);
- if (HasStationInUse(wp->index, INVALID_COMPANY)) return_cmd_error(STR_ERROR_BUOY_IS_IN_USE);
+ if (HasStationInUse(wp->index, false, _current_company)) return_cmd_error(STR_ERROR_BUOY_IS_IN_USE);
/* remove the buoy if there is a ship on tile when company goes bankrupt... */
if (!(flags & DC_BANKRUPT)) {
CommandCost ret = EnsureNoVehicleOnGround(tile);