equal
deleted
inserted
replaced
13 FOR_ALL_STATIONS(st) { |
13 FOR_ALL_STATIONS(st) { |
14 if (st->owner == _current_player && (type == AIStation::STATION_ANY || (st->facilities & type) != 0)) this->AddItem(st->index); |
14 if (st->owner == _current_player && (type == AIStation::STATION_ANY || (st->facilities & type) != 0)) this->AddItem(st->index); |
15 } |
15 } |
16 } |
16 } |
17 |
17 |
18 AIVehicleStationList::AIVehicleStationList(VehicleID vehicle_id) |
18 AIStationList_Vehicle::AIStationList_Vehicle(VehicleID vehicle_id) : AIStationList(AIStation::STATION_ANY) |
19 { |
19 { |
|
20 this->Clear(); |
20 if (!AIVehicle::IsValidVehicle(vehicle_id)) return; |
21 if (!AIVehicle::IsValidVehicle(vehicle_id)) return; |
21 |
22 |
22 Vehicle *v = ::GetVehicle(vehicle_id); |
23 Vehicle *v = ::GetVehicle(vehicle_id); |
23 |
24 |
24 for (Order *o = v->orders; o != NULL; o = o->next) { |
25 for (Order *o = v->orders; o != NULL; o = o->next) { |