(svn r17493) -Codechange: store the depot index on the map

This commit is contained in:
rubidium
2009-09-10 14:33:07 +00:00
parent bb94724a09
commit 55ddce8da2
11 changed files with 45 additions and 15 deletions

View File

@@ -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));
}