mirror of https://github.com/OpenTTD/OpenTTD
pull/14297/head
parent
c366e6a48e
commit
fea120a710
|
@ -366,8 +366,8 @@ StationIDStack OrderList::GetNextStoppingStation(const Vehicle *v, VehicleOrderI
|
||||||
VehicleOrderID next = first;
|
VehicleOrderID next = first;
|
||||||
if (first == INVALID_VEH_ORDER_ID) {
|
if (first == INVALID_VEH_ORDER_ID) {
|
||||||
next = v->cur_implicit_order_index;
|
next = v->cur_implicit_order_index;
|
||||||
if (next == INVALID_VEH_ORDER_ID) {
|
if (next >= this->GetNumOrders()) {
|
||||||
next = v->orders->GetFirstOrder();
|
next = this->GetFirstOrder();
|
||||||
if (next == INVALID_VEH_ORDER_ID) return StationID::Invalid().base();
|
if (next == INVALID_VEH_ORDER_ID) return StationID::Invalid().base();
|
||||||
} else {
|
} else {
|
||||||
/* GetNext never returns INVALID_VEH_ORDER_ID if there is a valid station in the list.
|
/* GetNext never returns INVALID_VEH_ORDER_ID if there is a valid station in the list.
|
||||||
|
|
Loading…
Reference in New Issue