diff options
author | rubidium <rubidium@openttd.org> | 2009-07-25 08:54:19 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-25 08:54:19 +0000 |
commit | 7440ec7a7350051297439f58f30d63f02018a507 (patch) | |
tree | 5d23745781a128a5644c0169ea0d7eb8913f9e38 /src/ai | |
parent | 59c48fee8bda56a788310f6d83b99087d518fb0f (diff) | |
download | openttd-7440ec7a7350051297439f58f30d63f02018a507.tar.xz |
(svn r16947) -Codechange: use TileArea instead of train_tile, trainst_w and trainst_h.
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/api/ai_order.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/api/ai_order.cpp b/src/ai/api/ai_order.cpp index 8028da8c0..aa91a539a 100644 --- a/src/ai/api/ai_order.cpp +++ b/src/ai/api/ai_order.cpp @@ -179,9 +179,9 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or case OT_GOTO_STATION: { const Station *st = ::Station::Get(order->GetDestination()); - if (st->train_tile != INVALID_TILE) { - for (uint i = 0; i < st->trainst_w; i++) { - TileIndex t = st->train_tile + TileDiffXY(i, 0); + if (st->train_station.tile != INVALID_TILE) { + for (uint i = 0; i < st->train_station.w; i++) { + TileIndex t = st->train_station.tile + TileDiffXY(i, 0); if (st->TileBelongsToRailStation(t)) return t; } } else if (st->dock_tile != INVALID_TILE) { |