src/roadveh_cmd.cpp
changeset 6589 addf4b6946d0
parent 6585 7da94b26498a
child 6642 2e690e6fdc03
child 9476 1d1ed96f32ad
equal deleted inserted replaced
6588:73d273b7b9fc 6589:addf4b6946d0
   680 	if (v->cur_order_index >= v->num_orders) v->cur_order_index = 0;
   680 	if (v->cur_order_index >= v->num_orders) v->cur_order_index = 0;
   681 
   681 
   682 	order = GetVehicleOrder(v, v->cur_order_index);
   682 	order = GetVehicleOrder(v, v->cur_order_index);
   683 
   683 
   684 	if (order == NULL) {
   684 	if (order == NULL) {
   685 		v->current_order.type = OT_NOTHING;
   685 		v->current_order.Free();
   686 		v->current_order.flags = 0;
       
   687 		v->dest_tile = 0;
   686 		v->dest_tile = 0;
   688 		ClearSlot(v);
   687 		ClearSlot(v);
   689 		return;
   688 		return;
   690 	}
   689 	}
   691 
   690 
  1616 			if (rs->IsEntranceBusy()) {
  1615 			if (rs->IsEntranceBusy()) {
  1617 				/* Road stop entrance is busy, so wait as there is nowhere else to go */
  1616 				/* Road stop entrance is busy, so wait as there is nowhere else to go */
  1618 				v->cur_speed = 0;
  1617 				v->cur_speed = 0;
  1619 				return;
  1618 				return;
  1620 			}
  1619 			}
  1621 			v->current_order.type = OT_NOTHING;
  1620 			v->current_order.Free();
  1622 			v->current_order.flags = 0;
       
  1623 			ClearSlot(v);
  1621 			ClearSlot(v);
  1624 		}
  1622 		}
  1625 
  1623 
  1626 		if (IsStandardRoadStopTile(v->tile)) rs->SetEntranceBusy(true);
  1624 		if (IsStandardRoadStopTile(v->tile)) rs->SetEntranceBusy(true);
  1627 
  1625