src/ai/api/ai_vehiclelist.cpp
branchnoai
changeset 9869 6404afe43575
parent 9837 c9ec4f82e0d0
child 10339 ce6cd68d9eb8
equal deleted inserted replaced
9868:3998f2e73dda 9869:6404afe43575
    24 	FOR_ALL_VEHICLES(v) {
    24 	FOR_ALL_VEHICLES(v) {
    25 		if (v->owner == _current_player && v->IsPrimaryVehicle()) {
    25 		if (v->owner == _current_player && v->IsPrimaryVehicle()) {
    26 			const Order *order;
    26 			const Order *order;
    27 
    27 
    28 			FOR_VEHICLE_ORDERS(v, order) {
    28 			FOR_VEHICLE_ORDERS(v, order) {
    29 				if (order->type == OT_GOTO_STATION && order->dest == station_id) {
    29 				if (order->IsType(OT_GOTO_STATION) && order->GetDestination() == station_id) {
    30 					this->AddItem(v->index);
    30 					this->AddItem(v->index);
    31 					break;
    31 					break;
    32 				}
    32 				}
    33 			}
    33 			}
    34 		}
    34 		}