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
commit6e7a7412cdb824dd53ca8470dcfbba1d07f891b8 (patch)
treec397ff33001e474f450c64ea28b740db9fd01e81 /src/ai/default
parentc34b458ace0695fd89116dc29de4e1bec5fca89b (diff)
downloadopenttd-6e7a7412cdb824dd53ca8470dcfbba1d07f891b8.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;