summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-30 13:16:45 +0000
committerrubidium <rubidium@openttd.org>2007-05-30 13:16:45 +0000
commita31e9441490d726b8887faf4d9f3fa320696a5b1 (patch)
tree74ea72f9ec30ca581aef3265586614745e7996ab /src
parent6252272e8771b2bf288be09e684b4d0a5964e426 (diff)
downloadopenttd-a31e9441490d726b8887faf4d9f3fa320696a5b1.tar.xz
(svn r9986) -Fix (r9934): flooding towns could not remove tram tracks (boekabart).
Diffstat (limited to 'src')
-rw-r--r--src/road_cmd.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 5fe6a9bf0..b0bd6ec6f 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -51,8 +51,11 @@ bool CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, Owner owner, bool *ed
if (_game_mode == GM_EDITOR || remove == ROAD_NONE) return true;
- /* Only do the special processing for actual players. */
- if (rt == ROADTYPE_ROAD && !IsValidPlayer(_current_player)) return true;
+ /* Water can always flood and towns can always remove "normal" road pieces.
+ * Towns are not be allowed to remove non "normal" road pieces, like tram
+ * tracks as that would result in trams that cannot turn. */
+ if (_current_player == OWNER_WATER ||
+ (rt == ROADTYPE_ROAD && !IsValidPlayer(_current_player))) return true;
/* Only do the special processing if the road is owned
* by a town */