forked from mirror/OpenTTD
(svn r3944) -Feature: it's now possible to turn a single unit in a train
control-click on a unit in a train in a depot will make the click unit turn around this is useful if you want "normal" engines to act as dualheaded (one each way) or similar this only works on single unit units. Multiheaded and articulated engines get a red error box this is based on a quick hack peter1138 while I made it network safe and correctly handling of multible unit engines
This commit is contained in:
@@ -724,7 +724,9 @@ static void TrainDepotWndProc(Window *w, WindowEvent *e)
|
||||
|
||||
if (GetVehicleFromTrainDepotWndPt(w, e->dragdrop.pt.x, e->dragdrop.pt.y, &gdvp) == 0 &&
|
||||
sel != INVALID_VEHICLE) {
|
||||
if (gdvp.wagon == NULL || gdvp.wagon->index != sel) {
|
||||
if (gdvp.wagon != NULL && gdvp.wagon->index == sel && _ctrl_pressed) {
|
||||
DoCommandP(GetVehicle(sel)->tile, GetVehicle(sel)->index, true, NULL, CMD_REVERSE_TRAIN_DIRECTION | CMD_MSG(STR_9033_CAN_T_MAKE_VEHICLE_TURN));
|
||||
} else if (gdvp.wagon == NULL || gdvp.wagon->index != sel) {
|
||||
TrainDepotMoveVehicle(gdvp.wagon, sel, gdvp.head);
|
||||
} else if (gdvp.head != NULL && IsFrontEngine(gdvp.head)) {
|
||||
ShowTrainViewWindow(gdvp.head);
|
||||
|
Reference in New Issue
Block a user