Add road tile cached one way state, one way road section detection

This commit is contained in:
Jonathan G Rennison
2020-10-26 22:17:25 +00:00
parent 2fe5d4339b
commit ffe3c769a3
16 changed files with 441 additions and 104 deletions

View File

@@ -739,6 +739,7 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
Company::Get(tram_owner)->infrastructure.road[roadtype_tram] += num_new_tram_pieces;
DirtyCompanyInfrastructureWindows(tram_owner);
}
UpdateRoadCachedOneWayStatesAroundTile(tile);
}
break;
}
@@ -847,6 +848,7 @@ CommandCost CmdRemoveSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1,
DirtyCompanyInfrastructureWindows(owner);
MakeRoadNormal(tile, GetCrossingRoadBits(tile), GetRoadTypeRoad(tile), GetRoadTypeTram(tile), GetTownIndex(tile), GetRoadOwner(tile, RTT_ROAD), GetRoadOwner(tile, RTT_TRAM));
DeleteNewGRFInspectWindow(GSF_RAILTYPES, tile);
UpdateRoadCachedOneWayStatesAroundTile(tile);
}
break;
}