summaryrefslogtreecommitdiff
path: root/train_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'train_gui.c')
-rw-r--r--train_gui.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/train_gui.c b/train_gui.c
index bed0b9cd6..e9635ef0e 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -1494,26 +1494,11 @@ static void PlayerTrainsWndProc(Window *w, WindowEvent *e)
}
} break;
- case 9: { /* Build new Vehicle */
- TileIndex tile;
-
- if (!IsWindowOfPrototype(w, _player_trains_widgets))
- break;
-
- tile = _last_built_train_depot_tile;
- do {
- if (IsTileDepotType(tile, TRANSPORT_RAIL) &&
- IsTileOwner(tile, _local_player)) {
- ShowTrainDepotWindow(tile);
- ShowBuildTrainWindow(tile);
- return;
- }
-
- tile = TILE_MASK(tile + 1);
- } while (tile != _last_built_train_depot_tile);
-
+ case 9: /* Build new Vehicle */
+ if (!IsWindowOfPrototype(w, _player_trains_widgets)) break;
ShowBuildTrainWindow(0);
- } break;
+ break;
+
case 10: {
if (!IsWindowOfPrototype(w, _player_trains_widgets))
break;