summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rail_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 2eb8b056f..ee68bd69c 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -770,6 +770,9 @@ static CommandCost CmdRailTrackHelper(TileIndex tile, DoCommandFlag flags, uint3
if (HasBit(p2, 8)) return last_error;
break;
}
+
+ /* Ownership errors are more important. */
+ if (last_error.GetErrorMessage() == STR_ERROR_OWNED_BY && remove) break;
} else {
had_success = true;
total_cost.AddCost(ret);