changeset 5942:95c1ea04b01d draft

(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.
author rubidium <rubidium@openttd.org>
date Tue, 06 Feb 2007 09:25:52 +0000
parents d0e1f93e603a
children 375985ba9c32
files src/road_cmd.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -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);