equal
deleted
inserted
replaced
2607 if (v->current_order.flags & OF_NON_STOP) |
2607 if (v->current_order.flags & OF_NON_STOP) |
2608 v->u.rail.days_since_order_progr = 0; |
2608 v->u.rail.days_since_order_progr = 0; |
2609 |
2609 |
2610 if (--v->load_unload_time_rem) return; |
2610 if (--v->load_unload_time_rem) return; |
2611 |
2611 |
2612 if (v->current_order.flags & OF_FULL_LOAD && CanFillVehicle(v)) { |
2612 if (CanFillVehicle(v) && (v->current_order.flags & OF_FULL_LOAD || |
|
2613 (_patches.gradual_loading && !HASBIT(v->load_status, LS_LOADING_FINISHED)))) { |
2613 v->u.rail.days_since_order_progr = 0; /* Prevent a train lost message for full loading trains */ |
2614 v->u.rail.days_since_order_progr = 0; /* Prevent a train lost message for full loading trains */ |
2614 SET_EXPENSES_TYPE(EXPENSES_TRAIN_INC); |
2615 SET_EXPENSES_TYPE(EXPENSES_TRAIN_INC); |
2615 if (LoadUnloadVehicle(v)) { |
2616 if (LoadUnloadVehicle(v, false)) { |
2616 InvalidateWindow(WC_TRAINS_LIST, v->owner); |
2617 InvalidateWindow(WC_TRAINS_LIST, v->owner); |
2617 MarkTrainDirty(v); |
2618 MarkTrainDirty(v); |
2618 |
2619 |
2619 // need to update acceleration and cached values since the goods on the train changed. |
2620 // need to update acceleration and cached values since the goods on the train changed. |
2620 TrainCargoChanged(v); |
2621 TrainCargoChanged(v); |
2710 v->current_order.flags = 0; |
2711 v->current_order.flags = 0; |
2711 } |
2712 } |
2712 v->current_order.dest = 0; |
2713 v->current_order.dest = 0; |
2713 |
2714 |
2714 SET_EXPENSES_TYPE(EXPENSES_TRAIN_INC); |
2715 SET_EXPENSES_TYPE(EXPENSES_TRAIN_INC); |
2715 if (LoadUnloadVehicle(v) != 0) { |
2716 if (LoadUnloadVehicle(v, true) != 0) { |
2716 InvalidateWindow(WC_TRAINS_LIST, v->owner); |
2717 InvalidateWindow(WC_TRAINS_LIST, v->owner); |
2717 TrainCargoChanged(v); |
2718 TrainCargoChanged(v); |
2718 UpdateTrainAcceleration(v); |
2719 UpdateTrainAcceleration(v); |
2719 } |
2720 } |
2720 MarkTrainDirty(v); |
2721 MarkTrainDirty(v); |