summaryrefslogtreecommitdiff
path: root/src/ai/default
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-05-24 19:36:20 +0000
committerfrosch <frosch@openttd.org>2008-05-24 19:36:20 +0000
commit8f104a2e971822e548d210bcd83f84057e54702d (patch)
treec397ff33001e474f450c64ea28b740db9fd01e81 /src/ai/default
parentca244cbd06c071ee625f47ddf80d055bfcab072f (diff)
downloadopenttd-8f104a2e971822e548d210bcd83f84057e54702d.tar.xz
(svn r13233) -Fix: Replace some (incorrect) evaluations of TileOwner by RoadOwner.
-Fix: Before evaluating RoadOwner, check if the roadtype is present. -Fix: Some places assumed that MP_ROAD means normal street.
Diffstat (limited to 'src/ai/default')
-rw-r--r--src/ai/default/default.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index fc874f322..2843d0dc7 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -3763,11 +3763,11 @@ pos_3:
DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
}
} else if (IsTileType(tile, MP_ROAD)) {
- if (!IsTileOwner(tile, _current_player)) return;
-
if (IsLevelCrossing(tile)) goto is_rail_crossing;
if (IsRoadDepot(tile)) {
+ if (!IsTileOwner(tile, _current_player)) return;
+
DiagDirection dir;
TileIndex t;