train_cmd.c
changeset 5259 08336337aae0
parent 5256 90226d8da8fb
child 5277 5d278741650c
equal deleted inserted replaced
5258:eae66ac02803 5259:08336337aae0
  2048 		v->dest_tile = tfdd.tile;
  2048 		v->dest_tile = tfdd.tile;
  2049 		v->current_order.type = OT_GOTO_DEPOT;
  2049 		v->current_order.type = OT_GOTO_DEPOT;
  2050 		v->current_order.flags = OF_NON_STOP;
  2050 		v->current_order.flags = OF_NON_STOP;
  2051 		if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
  2051 		if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
  2052 		v->current_order.dest = GetDepotByTile(tfdd.tile)->index;
  2052 		v->current_order.dest = GetDepotByTile(tfdd.tile)->index;
       
  2053 		v->current_order.refit_cargo = CT_INVALID;
  2053 		InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
  2054 		InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
  2054 		/* If there is no depot in front, reverse automatically */
  2055 		/* If there is no depot in front, reverse automatically */
  2055 		if (tfdd.reverse)
  2056 		if (tfdd.reverse)
  2056 			DoCommand(v->tile, v->index, 0, DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION);
  2057 			DoCommand(v->tile, v->index, 0, DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION);
  2057 	}
  2058 	}