order_cmd.c
changeset 725 4676c33f491e
parent 723 edd37e6da51f
child 824 0b53d230c616
equal deleted inserted replaced
724:a73dec475b53 725:4676c33f491e
   175 	if (sel >= v->num_orders)
   175 	if (sel >= v->num_orders)
   176 		return CMD_ERROR;
   176 		return CMD_ERROR;
   177 
   177 
   178 	sched = &v->schedule_ptr[sel];
   178 	sched = &v->schedule_ptr[sel];
   179 	if (sched->type != OT_GOTO_STATION &&
   179 	if (sched->type != OT_GOTO_STATION &&
   180 			(sched->type != OT_GOTO_DEPOT || (p2 >> 8) == 1))
   180 			(sched->type != OT_GOTO_DEPOT || (p2 >> 8) == 1) &&
       
   181 			(sched->type != OT_GOTO_WAYPOINT || (p2 >> 8) != 2))
   181 		return CMD_ERROR;
   182 		return CMD_ERROR;
   182 
   183 
   183 	if (flags & DC_EXEC) {
   184 	if (flags & DC_EXEC) {
   184 		switch (p2 >> 8) {
   185 		switch (p2 >> 8) {
   185 		case 0: // full load
   186 		case 0: // full load