branch | noai |
changeset 9869 | 6404afe43575 |
parent 9837 | c9ec4f82e0d0 |
child 10339 | ce6cd68d9eb8 |
9868:3998f2e73dda | 9869:6404afe43575 |
---|---|
21 if (!AIVehicle::IsValidVehicle(vehicle_id)) return; |
21 if (!AIVehicle::IsValidVehicle(vehicle_id)) return; |
22 |
22 |
23 Vehicle *v = ::GetVehicle(vehicle_id); |
23 Vehicle *v = ::GetVehicle(vehicle_id); |
24 |
24 |
25 for (Order *o = v->orders; o != NULL; o = o->next) { |
25 for (Order *o = v->orders; o != NULL; o = o->next) { |
26 if (o->type == OT_GOTO_STATION) this->AddItem(o->dest); |
26 if (o->IsType(OT_GOTO_STATION)) this->AddItem(o->GetDestination()); |
27 } |
27 } |
28 } |
28 } |