Signals on tunnel/bridges are now added to infrastructure stats.

This commit is contained in:
Jonathan G Rennison
2017-01-30 21:37:17 +00:00
parent 08062096ab
commit d762835903
6 changed files with 59 additions and 3 deletions

View File

@@ -205,7 +205,12 @@ void AfterLoadCompanyStats()
switch (GetTunnelBridgeTransportType(tile)) {
case TRANSPORT_RAIL:
c = Company::GetIfValid(GetTileOwner(tile));
if (c != NULL) c->infrastructure.rail[GetRailType(tile)] += len;
if (c != NULL) {
c->infrastructure.rail[GetRailType(tile)] += len;
if (IsTunnelBridgeWithSignalSimulation(tile)) {
c->infrastructure.signal += GetTunnelBridgeSignalSimulationSignalCount(tile, other_end);
}
}
break;
case TRANSPORT_ROAD: {