diff options
author | rubidium <rubidium@openttd.org> | 2009-09-10 14:33:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-09-10 14:33:07 +0000 |
commit | 55ddce8da2b6993fa1228a8935526d40fc44de46 (patch) | |
tree | 02f1f3836fd9c76b19b741a772d0efb29c528d7b /src/rail_cmd.cpp | |
parent | bb94724a092750794e8c2ad1a6537fac6b902b9e (diff) | |
download | openttd-55ddce8da2b6993fa1228a8935526d40fc44de46.tar.xz |
(svn r17493) -Codechange: store the depot index on the map
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 6b875f843..c2633bcf7 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -789,11 +789,11 @@ CommandCost CmdBuildTrainDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u if (flags & DC_EXEC) { Depot *d = new Depot(tile); - MakeRailDepot(tile, _current_company, dir, (RailType)p1); - MarkTileDirtyByTile(tile); - d->town_index = ClosestTownFromTile(tile, UINT_MAX)->index; + MakeRailDepot(tile, _current_company, d->index, dir, (RailType)p1); + MarkTileDirtyByTile(tile); + AddSideToSignalBuffer(tile, INVALID_DIAGDIR, _current_company); YapfNotifyTrackLayoutChange(tile, DiagDirToDiagTrack(dir)); } |