Mercurial > hg > openttd
changeset 15691:4363493b3838 draft
(svn r20357) -Fix (r20356): Call GetAllRoadBits() only if there is road.
author | frosch <frosch@openttd.org> |
---|---|
date | Wed, 04 Aug 2010 06:27:20 +0000 |
parents | b1af6b1e509d |
children | 450d0cb8bf5f |
files | src/station_cmd.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -862,7 +862,7 @@ } else { bool build_over_road = is_drive_through && IsNormalRoadTile(cur_tile); /* Road bits in the wrong direction. */ - RoadBits rb = GetAllRoadBits(cur_tile); + RoadBits rb = IsNormalRoadTile(cur_tile) ? GetAllRoadBits(cur_tile) : ROAD_NONE; if (build_over_road && (rb & (axis == AXIS_X ? ROAD_Y : ROAD_X)) != 0) { /* Someone was pedantic and *NEEDED* three fracking different error messages. */ switch (CountBits(rb)) {