summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-16 22:44:56 +0000
committerrubidium <rubidium@openttd.org>2007-02-16 22:44:56 +0000
commitc04c8382ca52a343494fb8c4dc66b2a8ef94e714 (patch)
tree47beb5b6e722d1dfc784788f03af450c40963d05 /src/station_cmd.cpp
parent76eb16252ad3e3dc259905e4e895884096004fa5 (diff)
downloadopenttd-c04c8382ca52a343494fb8c4dc66b2a8ef94e714.tar.xz
(svn r8765) -Codechange: remove logic redundancy by moving it from the gui into the cmd code.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 463ed4487..425fb49f0 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1276,6 +1276,8 @@ int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (!(flags & DC_NO_TOWN_RATING) && !CheckIfAuthorityAllows(tile))
return CMD_ERROR;
+ if (build_over_road) flags ^= DC_AUTO;
+
if (build_over_road && IsTileOwner(tile, OWNER_TOWN)) _current_player = OWNER_TOWN;
ret = CheckFlatLandBelow(tile, 1, 1, flags, is_drive_through ? 5 << p1 : 1 << p1, NULL);
_current_player = cur_owner;