equal
deleted
inserted
replaced
262 if (v->cur_order_index >= v->num_orders) v->cur_order_index = 0; |
262 if (v->cur_order_index >= v->num_orders) v->cur_order_index = 0; |
263 |
263 |
264 order = GetVehicleOrder(v, v->cur_order_index); |
264 order = GetVehicleOrder(v, v->cur_order_index); |
265 |
265 |
266 if (order == NULL) { |
266 if (order == NULL) { |
267 v->current_order.type = OT_NOTHING; |
267 v->current_order.Free(); |
268 v->current_order.flags = 0; |
|
269 v->dest_tile = 0; |
268 v->dest_tile = 0; |
270 return; |
269 return; |
271 } |
270 } |
272 |
271 |
273 if (order->type == v->current_order.type && |
272 if (order->type == v->current_order.type && |
703 if (HASBIT(r, VETS_CANNOT_ENTER)) goto reverse_direction; |
702 if (HASBIT(r, VETS_CANNOT_ENTER)) goto reverse_direction; |
704 |
703 |
705 /* A leave station order only needs one tick to get processed, so we can |
704 /* A leave station order only needs one tick to get processed, so we can |
706 * always skip ahead. */ |
705 * always skip ahead. */ |
707 if (v->current_order.type == OT_LEAVESTATION) { |
706 if (v->current_order.type == OT_LEAVESTATION) { |
708 v->current_order.type = OT_NOTHING; |
707 v->current_order.Free(); |
709 v->current_order.flags = 0; |
|
710 InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); |
708 InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); |
711 } else if (v->dest_tile != 0) { |
709 } else if (v->dest_tile != 0) { |
712 /* We have a target, let's see if we reached it... */ |
710 /* We have a target, let's see if we reached it... */ |
713 if (v->current_order.type == OT_GOTO_STATION && |
711 if (v->current_order.type == OT_GOTO_STATION && |
714 IsBuoyTile(v->dest_tile) && |
712 IsBuoyTile(v->dest_tile) && |