summaryrefslogtreecommitdiff
path: root/src/ai/api
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-07-01 23:49:13 +0000
committersmatz <smatz@openttd.org>2009-07-01 23:49:13 +0000
commitecfaa0564d9588b9f6826b1033d93b827751f410 (patch)
treef04dff76baabb0dcc7e952f9d81b70828398a740 /src/ai/api
parentadc5363202629aa07c762f459d7e9f5bc78efa34 (diff)
downloadopenttd-ecfaa0564d9588b9f6826b1033d93b827751f410.tar.xz
(svn r16718) -Codechange: make IsFreeWagon() member of Train
Diffstat (limited to 'src/ai/api')
-rw-r--r--src/ai/api/ai_vehicle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_vehicle.cpp b/src/ai/api/ai_vehicle.cpp
index b1e4e0ad7..45e50ca4d 100644
--- a/src/ai/api/ai_vehicle.cpp
+++ b/src/ai/api/ai_vehicle.cpp
@@ -20,7 +20,7 @@
/* static */ bool AIVehicle::IsValidVehicle(VehicleID vehicle_id)
{
const Vehicle *v = ::Vehicle::GetIfValid(vehicle_id);
- return v != NULL && v->owner == _current_company && (v->IsPrimaryVehicle() || (v->type == VEH_TRAIN && ::IsFreeWagon(v)));
+ return v != NULL && v->owner == _current_company && (v->IsPrimaryVehicle() || (v->type == VEH_TRAIN && ::Train::From(v)->IsFreeWagon()));
}
/* static */ int32 AIVehicle::GetNumWagons(VehicleID vehicle_id)