diff options
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 5e00bfcb2..d4442a9b9 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -454,7 +454,15 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u default: break; case ROADTYPES_TRAM: /* Tram crossings must always have road. */ - if (flags & DC_EXEC) SetRoadOwner(tile, ROADTYPE_ROAD, _current_company); + if (flags & DC_EXEC) { + SetRoadOwner(tile, ROADTYPE_ROAD, _current_company); + Company *c = Company::GetIfValid(_current_company); + if (c != NULL) { + /* A full diagonal tile has two road bits. */ + c->infrastructure.road[ROADTYPE_ROAD] += 2; + DirtyCompanyInfrastructureWindows(c->index); + } + } roadtypes |= ROADTYPES_ROAD; break; |