diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 8bfbc1469b..b53a7da479 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1161,7 +1161,7 @@ CommandCost CmdSkipToOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 InvalidateVehicleOrder(v, VIWD_MODIFY_ORDERS); - if (_settings_game.order.timetable_separation) v->ClearSeparation(); + v->ClearSeparation(); if (_settings_game.order.timetable_separation) ClrBit(v->vehicle_flags, VF_TIMETABLE_STARTED); } @@ -1626,7 +1626,7 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 SetBit(dst->vehicle_flags, VF_AUTOMATE_TIMETABLE); } - if (_settings_game.order.timetable_separation) dst->ClearSeparation(); + dst->ClearSeparation(); if (_settings_game.order.timetable_separation) ClrBit(dst->vehicle_flags, VF_TIMETABLE_STARTED); InvalidateVehicleOrder(dst, VIWD_REMOVE_ALL_ORDERS); diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index d3440fc281..b0e41d9659 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -591,7 +591,7 @@ void UpdateVehicleTimetable(Vehicle *v, bool travelling) /* Start automated timetables at first opportunity */ if (!HasBit(v->vehicle_flags, VF_TIMETABLE_STARTED) && HasBit(v->vehicle_flags, VF_AUTOMATE_TIMETABLE)) { - if (_settings_game.order.timetable_separation) v->ClearSeparation(); + v->ClearSeparation(); SetBit(v->vehicle_flags, VF_TIMETABLE_STARTED); v->lateness_counter = 0; if (_settings_game.order.timetable_separation) UpdateSeparationOrder(v); @@ -680,7 +680,7 @@ void UpdateVehicleTimetable(Vehicle *v, bool travelling) * Otherwise we risk trains blocking 1-lane stations for long times. */ ChangeTimetable(v, v->cur_real_order_index, 0, travelling ? MTF_TRAVEL_TIME : MTF_WAIT_TIME, true); for (Vehicle *v2 = v->FirstShared(); v2 != NULL; v2 = v2->NextShared()) { - if (_settings_game.order.timetable_separation) v2->ClearSeparation(); + v2->ClearSeparation(); ClrBit(v2->vehicle_flags, VF_TIMETABLE_STARTED); SetWindowDirty(WC_VEHICLE_TIMETABLE, v2->index); } diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 6a79977d37..139670547e 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -209,7 +209,7 @@ uint Vehicle::Crash(bool flooded) v->MarkAllViewportsDirty(); } - if (_settings_game.order.timetable_separation) this->ClearSeparation(); + this->ClearSeparation(); if (_settings_game.order.timetable_separation) ClrBit(this->vehicle_flags, VF_TIMETABLE_STARTED); /* Dirty some windows */ @@ -2230,7 +2230,7 @@ CommandCost Vehicle::SendToDepot(DoCommandFlag flags, DepotCommand command) if (flags & DC_EXEC) { this->current_order.SetDepotOrderType(ODTF_MANUAL); this->current_order.SetDepotActionType(halt_in_depot ? ODATF_SERVICE_ONLY : ODATFB_HALT); - if (_settings_game.order.timetable_separation) this->ClearSeparation(); + this->ClearSeparation(); if (_settings_game.order.timetable_separation) ClrBit(this->vehicle_flags, VF_TIMETABLE_STARTED); SetWindowWidgetDirty(WC_VEHICLE_VIEW, this->index, WID_VV_START_STOP); } @@ -2248,7 +2248,7 @@ CommandCost Vehicle::SendToDepot(DoCommandFlag flags, DepotCommand command) SetBit(gv_flags, GVF_SUPPRESS_IMPLICIT_ORDERS); } - if (_settings_game.order.timetable_separation) this->ClearSeparation(); + this->ClearSeparation(); if (_settings_game.order.timetable_separation) ClrBit(this->vehicle_flags, VF_TIMETABLE_STARTED); this->current_order.MakeDummy(); @@ -2701,7 +2701,7 @@ void Vehicle::RemoveFromShared() this->next_shared = NULL; this->previous_shared = NULL; - if (_settings_game.order.timetable_separation) this->ClearSeparation(); + this->ClearSeparation(); if (_settings_game.order.timetable_separation) ClrBit(this->vehicle_flags, VF_TIMETABLE_STARTED); } diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index b86ead98d0..8ea1ac7786 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -578,7 +578,7 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, if (flags & DC_EXEC) { if (v->IsStoppedInDepot() && (flags & DC_AUTOREPLACE) == 0) DeleteVehicleNews(p1, STR_NEWS_TRAIN_IS_WAITING + v->type); - if (_settings_game.order.timetable_separation) v->ClearSeparation(); + v->ClearSeparation(); if (_settings_game.order.timetable_separation) ClrBit(v->vehicle_flags, VF_TIMETABLE_STARTED); v->vehstatus ^= VS_STOPPED;