(svn r8608) -Fix: you were unable to build roads in the scenario editor when there is no town 0, even though there are other towns.
authorrubidium
Tue, 06 Feb 2007 09:25:52 +0000
changeset 6193 71f42ac93928
parent 6192 c6adfc929c6b
child 6194 3d84c2b85f3d
(svn r8608) -Fix: you were unable to build roads in the scenario editor when there is no town 0, even though there are other towns.
src/road_cmd.cpp
--- a/src/road_cmd.cpp	Mon Feb 05 21:16:56 2007 +0000
+++ b/src/road_cmd.cpp	Tue Feb 06 09:25:52 2007 +0000
@@ -263,7 +263,7 @@
 
 	/* Road pieces are max 4 bitset values (NE, NW, SE, SW) and town can only be non-zero
 	 * if a non-player is building the road */
-	if ((p1 >> 4) || (IsValidPlayer(_current_player) && p2 != 0) || !IsValidTownID(p2)) return CMD_ERROR;
+	if ((p1 >> 4) || (IsValidPlayer(_current_player) && p2 != 0) || (_current_player == OWNER_TOWN && !IsValidTownID(p2))) return CMD_ERROR;
 	pieces = (RoadBits)p1;
 
 	tileh = GetTileSlope(tile, NULL);