summaryrefslogtreecommitdiff
path: root/src/rail_cmd.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-07-09 16:43:00 +0000
committerterkhen <terkhen@openttd.org>2010-07-09 16:43:00 +0000
commit5ea472650c41a696a0952f726e8143555ef4cc4c (patch)
tree9baf5c8db09ff60cbb70a7198dd26c0851582e69 /src/rail_cmd.cpp
parentf363f64c51eccfebbf24fc5947bd4df249e32d3d (diff)
downloadopenttd-5ea472650c41a696a0952f726e8143555ef4cc4c.tar.xz
(svn r20100) -Fix: Give priority to ownership errors while removing rails.
Diffstat (limited to 'src/rail_cmd.cpp')
-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);