diff --git a/src/tbtr_template_gui_create.cpp b/src/tbtr_template_gui_create.cpp index bb4a77301b..0b77ec494b 100644 --- a/src/tbtr_template_gui_create.cpp +++ b/src/tbtr_template_gui_create.cpp @@ -378,7 +378,10 @@ public: GetDepotVehiclePtData gdvp = { nullptr, nullptr }; if (this->GetVehicleFromDepotWndPt(pt.x - nwi->pos_x, pt.y - nwi->pos_y, &v, &gdvp) == MODE_DRAG_VEHICLE && sel != INVALID_VEHICLE) { - if (gdvp.wagon == nullptr || gdvp.wagon->index != sel) { + if (gdvp.wagon != nullptr && gdvp.wagon->index == sel && _ctrl_pressed) { + DoCommandP(Vehicle::Get(sel)->tile, Vehicle::Get(sel)->index, true, + CMD_REVERSE_TRAIN_DIRECTION | CMD_MSG(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE)); + } else if (gdvp.wagon == nullptr || gdvp.wagon->index != sel) { this->vehicle_over = INVALID_VEHICLE; TrainDepotMoveVehicle(gdvp.wagon, sel, gdvp.head); } diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 9a4aa3ff71..55e33ce065 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2409,7 +2409,7 @@ CommandCost CmdReverseTrainDirection(TileIndex tile, DoCommandFlag flags, uint32 Train *front = v->First(); /* make sure the vehicle is stopped in the depot */ - if (!front->IsStoppedInDepot()) { + if (!front->IsStoppedInDepot() && !front->IsVirtual()) { return_cmd_error(STR_ERROR_TRAINS_CAN_ONLY_BE_ALTERED_INSIDE_A_DEPOT); }