From 7a37220881c995f317bf5bd0f3077fa6c9e9d098 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 22 May 2009 20:22:20 +0000 Subject: (svn r16390) -Codechange: move u.road to RoadVehicle. --- src/ai/api/ai_vehicle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ai') diff --git a/src/ai/api/ai_vehicle.cpp b/src/ai/api/ai_vehicle.cpp index 3e30601fe..fa324200a 100644 --- a/src/ai/api/ai_vehicle.cpp +++ b/src/ai/api/ai_vehicle.cpp @@ -45,7 +45,7 @@ case VEH_ROAD: { uint total_length = 0; for (const Vehicle *u = v; u != NULL; u = u->Next()) { - total_length += u->u.road.cached_veh_length; + total_length += ((RoadVehicle*)u)->cached_veh_length; } return total_length; } @@ -368,7 +368,7 @@ if (!IsValidVehicle(vehicle_id)) return AIRoad::ROADTYPE_INVALID; if (GetVehicleType(vehicle_id) != VT_ROAD) return AIRoad::ROADTYPE_INVALID; - return (AIRoad::RoadType)::Vehicle::Get(vehicle_id)->u.road.roadtype; + return (AIRoad::RoadType)((RoadVehicle*)::Vehicle::Get(vehicle_id))->roadtype; } /* static */ int32 AIVehicle::GetCapacity(VehicleID vehicle_id, CargoID cargo) -- cgit v1.2.3-54-g00ecf