summaryrefslogtreecommitdiff
path: root/src/road_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-03-13 15:33:07 +0000
committeralberth <alberth@openttd.org>2010-03-13 15:33:07 +0000
commit6b6ff9c52b04ec47de1281284fcc99f6775f2302 (patch)
tree303ab0e7deed7d7293218566146fa6b60387de73 /src/road_cmd.cpp
parent7134201524f61ce4234c476fe2d8c16eec4f391e (diff)
downloadopenttd-6b6ff9c52b04ec47de1281284fcc99f6775f2302.tar.xz
(svn r19400) -Codechange: CheckforTownRating returns a CommandCost.
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r--src/road_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 366f6bd0c..5d83abeef 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -140,7 +140,9 @@ bool CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, Owner owner, RoadType
/* check if you're allowed to remove the street owned by a town
* removal allowance depends on difficulty setting */
- if (!CheckforTownRating(flags, t, ROAD_REMOVE)) return false;
+ CommandCost ret = CheckforTownRating(flags, t, ROAD_REMOVE);
+ ret.SetGlobalErrorMessage();
+ if (ret.Failed()) return false;
/* Get a bitmask of which neighbouring roads has a tile */
RoadBits n = ROAD_NONE;