From 5ea472650c41a696a0952f726e8143555ef4cc4c Mon Sep 17 00:00:00 2001 From: terkhen Date: Fri, 9 Jul 2010 16:43:00 +0000 Subject: (svn r20100) -Fix: Give priority to ownership errors while removing rails. --- src/rail_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit v1.2.3-70-g09d2