(svn r9986) -Fix (r9934): flooding towns could not remove tram tracks (boekabart).
authorrubidium
Wed, 30 May 2007 13:16:45 +0000
changeset 7247 78a25ab85148
parent 7246 145124064e1f
child 7248 a9ec96b296e5
(svn r9986) -Fix (r9934): flooding towns could not remove tram tracks (boekabart).
src/road_cmd.cpp
--- a/src/road_cmd.cpp	Wed May 30 07:59:43 2007 +0000
+++ b/src/road_cmd.cpp	Wed May 30 13:16:45 2007 +0000
@@ -51,8 +51,11 @@
 
 	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 */