Skip to content

Commit

Permalink
Fix #8506: Towns don't add junctions to NewGRF roads they cannot build
Browse files Browse the repository at this point in the history
  • Loading branch information
2TallTyler committed Jan 8, 2021
1 parent 5f591c8 commit 96ba627
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/town_cmd.cpp
Expand Up @@ -1349,6 +1349,9 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t

assert(tile < MapSize());

/* Don't allow junctions on roadtypes which can't be built by towns. */
if (IsTileType(tile, MP_ROAD) && !HasBit(GetRoadTypeInfo(GetRoadTypeRoad(tile))->flags, ROTF_TOWN_BUILD)) return;

if (cur_rb == ROAD_NONE) {
/* Tile has no road. First reset the status counter
* to say that this is the last iteration. */
Expand Down

0 comments on commit 96ba627

Please sign in to comment.