Loading

Paste #ptitz6wfx

  1. Index: src/water_cmd.cpp
  2. ===================================================================
  3. --- src/water_cmd.cpp   (revision 27203)
  4. +++ src/water_cmd.cpp   (working copy)
  5. @@ -265,6 +265,11 @@
  6.     /* lower tile */
  7.     WaterClass wc_lower = IsWaterTile(tile - delta) ? GetWaterClass(tile - delta) : WATER_CLASS_CANAL;
  8.  
  9. +   if (!_settings_game.construction.road_stop_on_competitor_road && !HasTileWaterGround(tile - delta) && GetTileOwner(tile - delta) != OWNER_NONE) {
  10. +       ret = CheckTileOwnership(tile - delta);
  11. +       if (ret.Failed()) return ret;
  12. +   }
  13. +
  14.     if (!IsWaterTile(tile - delta)) {
  15.         ret = DoCommand(tile - delta, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
  16.         if (ret.Failed()) return ret;
  17. @@ -278,6 +283,11 @@
  18.     /* upper tile */
  19.     WaterClass wc_upper = IsWaterTile(tile + delta) ? GetWaterClass(tile + delta) : WATER_CLASS_CANAL;
  20.  
  21. +   if (!_settings_game.construction.road_stop_on_competitor_road && !HasTileWaterGround(tile + delta) && GetTileOwner(tile + delta) != OWNER_NONE) {
  22. +       ret = CheckTileOwnership(tile + delta);
  23. +       if (ret.Failed()) return ret;
  24. +   }
  25. +
  26.     if (!IsWaterTile(tile + delta)) {
  27.         ret = DoCommand(tile + delta, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
  28.         if (ret.Failed()) return ret;

Comments