Changeset - r15441:95dabb8cf50d
[Not reviewed]
master
0 1 0
terkhen - 14 years ago 2010-07-09 16:43:00
terkhen@openttd.org
(svn r20100) -Fix: Give priority to ownership errors while removing rails.
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/rail_cmd.cpp
Show inline comments
 
@@ -767,12 +767,15 @@ static CommandCost CmdRailTrackHelper(Ti
 
		if (ret.Failed()) {
 
			last_error = ret;
 
			if (last_error.GetErrorMessage() != STR_ERROR_ALREADY_BUILT && !remove) {
 
				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);
 
		}
 

	
 
		if (tile == end_tile) break;
0 comments (0 inline, 0 general)