File diff r18977:1c3e0e63f950 → r18978:7e76e962d9b9
src/saveload/company_sl.cpp
Show inline comments
 
@@ -130,25 +130,25 @@ void AfterLoadCompanyStats()
 
				/* Iterate all present road types as each can have a different owner. */
 
				RoadType rt;
 
				FOR_EACH_SET_ROADTYPE(rt, GetRoadTypes(tile)) {
 
					c = Company::GetIfValid(IsRoadDepot(tile) ? GetTileOwner(tile) : GetRoadOwner(tile, rt));
 
					/* A level crossings and depots have two road bits. */
 
					if (c != NULL) c->infrastructure.road[rt] += IsNormalRoad(tile) ? CountBits(GetRoadBits(tile, rt)) : 2;
 
				}
 
				break;
 
			}
 

	
 
			case MP_STATION:
 
				c = Company::GetIfValid(GetTileOwner(tile));
 
				if (c != NULL && GetStationType(tile) != STATION_AIRPORT) c->infrastructure.station++;
 
				if (c != NULL && GetStationType(tile) != STATION_AIRPORT && !IsBuoy(tile)) c->infrastructure.station++;
 

	
 
				switch (GetStationType(tile)) {
 
					case STATION_RAIL:
 
					case STATION_WAYPOINT:
 
						if (c != NULL && !IsStationTileBlocked(tile)) c->infrastructure.rail[GetRailType(tile)]++;
 
						break;
 

	
 
					case STATION_BUS:
 
					case STATION_TRUCK: {
 
						/* Iterate all present road types as each can have a different owner. */
 
						RoadType rt;
 
						FOR_EACH_SET_ROADTYPE(rt, GetRoadTypes(tile)) {