# HG changeset patch # User frosch # Date 2012-12-26 13:01:28 # Node ID 55f25e66a6a21e6d01c9e482596d932b0dcf99bc # Parent f4a240e6f5e8d4e7bb7286866b6a33e2785775cd (svn r24857) -Fix: Don't let UFOs and coal mines clear water. diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1791,8 +1791,9 @@ static CommandCost ClearTile_Track(TileI 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;