diff options
author | frosch <frosch@openttd.org> | 2012-12-26 13:01:28 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-12-26 13:01:28 +0000 |
commit | e9afedca14d50b5d2f3011546b9a686f89ad1c07 (patch) | |
tree | 9f725a7844aeee02e8cd47630e551defaffbff1d | |
parent | b48c4c800bd9bd19918a61fb3eb7d84f702d25e4 (diff) | |
download | openttd-e9afedca14d50b5d2f3011546b9a686f89ad1c07.tar.xz |
(svn r24857) -Fix: Don't let UFOs and coal mines clear water.
-rw-r--r-- | src/rail_cmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 7ddfd0510..2f3728450 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1791,8 +1791,9 @@ static CommandCost ClearTile_Track(TileIndex tile, DoCommandFlag flags) cost.AddCost(ret); } - /* when bankrupting, don't make water dirty, there could be a ship on lower halftile */ - if (water_ground && !(flags & DC_BANKRUPT)) { + /* When bankrupting, don't make water dirty, there could be a ship on lower halftile. + * Same holds for non-companies clearing the tile, e.g. disasters. */ + if (water_ground && !(flags & DC_BANKRUPT) && Company::IsValidID(_current_company)) { CommandCost ret = EnsureNoVehicleOnGround(tile); if (ret.Failed()) return ret; |