src/order_cmd.cpp
changeset 8553 66a54e0c1c4a
parent 8428 f8300c908bd9
child 8560 8472721356cf
equal deleted inserted replaced
8552:320132f2b0c0 8553:66a54e0c1c4a
   674 
   674 
   675 	/* Is it a valid order? */
   675 	/* Is it a valid order? */
   676 	if (sel_ord >= v->num_orders) return CMD_ERROR;
   676 	if (sel_ord >= v->num_orders) return CMD_ERROR;
   677 
   677 
   678 	order = GetVehicleOrder(v, sel_ord);
   678 	order = GetVehicleOrder(v, sel_ord);
   679 	if (order->type != OT_GOTO_STATION &&
   679 	if ((order->type != OT_GOTO_STATION  || GetStation(order->dest)->IsBuoy()) &&
   680 			(order->type != OT_GOTO_DEPOT    || p2 == OFB_UNLOAD) &&
   680 			(order->type != OT_GOTO_DEPOT    || p2 == OFB_UNLOAD) &&
   681 			(order->type != OT_GOTO_WAYPOINT || p2 != OFB_NON_STOP)) {
   681 			(order->type != OT_GOTO_WAYPOINT || p2 != OFB_NON_STOP)) {
   682 		return CMD_ERROR;
   682 		return CMD_ERROR;
   683 	}
   683 	}
   684 
   684