summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_vehiclelist.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-10 14:37:55 +0000
committerrubidium <rubidium@openttd.org>2009-09-10 14:37:55 +0000
commit860a538adc56a678f640f606692ea7ca00c8d424 (patch)
tree70ac11ef8b475179092b2a435fa768d761bcc3b5 /src/ai/api/ai_vehiclelist.cpp
parent751ea62f442f0a8b1623e3df0c0ac5971f776d40 (diff)
downloadopenttd-860a538adc56a678f640f606692ea7ca00c8d424.tar.xz
(svn r17495) -Codechange: replace 'Depot::Get(GetDepotIndex(tile))->index' with GetDepotIndex(tile)
Diffstat (limited to 'src/ai/api/ai_vehiclelist.cpp')
-rw-r--r--src/ai/api/ai_vehiclelist.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/api/ai_vehiclelist.cpp b/src/ai/api/ai_vehiclelist.cpp
index 5e1fb6b07..61cbc9198 100644
--- a/src/ai/api/ai_vehiclelist.cpp
+++ b/src/ai/api/ai_vehiclelist.cpp
@@ -63,19 +63,19 @@ AIVehicleList_Depot::AIVehicleList_Depot(TileIndex tile)
case MP_RAILWAY:
if (!IsRailDepot(tile)) return;
type = VEH_TRAIN;
- dest = Depot::GetByTile(tile)->index;
+ dest = GetDepotIndex(tile);
break;
case MP_ROAD:
if (!IsRoadDepot(tile)) return;
type = VEH_ROAD;
- dest = Depot::GetByTile(tile)->index;
+ dest = GetDepotIndex(tile);
break;
case MP_WATER:
if (!IsShipDepot(tile)) return;
type = VEH_SHIP;
- dest = Depot::GetByTile(min(tile, GetOtherShipDepotTile(tile)))->index;
+ dest = GetDepotIndex(tile);
break;
default: // No depot