diff options
author | rubidium <rubidium@openttd.org> | 2007-02-06 09:25:52 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-02-06 09:25:52 +0000 |
commit | 8c3793a088091ab29fc99e40fb4a06e5e37c67bf (patch) | |
tree | f20694a348cb716949a58fb997fa203f36659d80 /src | |
parent | ca1a88f6c4595c2a8250f13a2a3e218558306693 (diff) | |
download | openttd-8c3793a088091ab29fc99e40fb4a06e5e37c67bf.tar.xz |
(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.
Diffstat (limited to 'src')
-rw-r--r-- | src/road_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 3fb8034c7..cbad915d4 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -263,7 +263,7 @@ int32 CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) /* 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); |