diff options
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 81bd3a5bc..abba2058f 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -867,10 +867,10 @@ CommandCost CmdBuildTrainDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u if (flags & DC_EXEC) { Depot *d = new Depot(tile); - d->town_index = ClosestTownFromTile(tile, UINT_MAX)->index; MakeRailDepot(tile, _current_company, d->index, dir, railtype); MarkTileDirtyByTile(tile); + MakeDefaultName(d); AddSideToSignalBuffer(tile, INVALID_DIAGDIR, _current_company); YapfNotifyTrackLayoutChange(tile, DiagDirToDiagTrack(dir)); |