mirror of https://github.com/OpenTTD/OpenTTD
Fix #7626: Allow building drive-through stops over one-way/blocked roads owned by towns (instead of crashing).
parent
058dadf315
commit
2d9eb1c417
|
@ -1005,7 +1005,7 @@ static CommandCost CheckFlatLandRoadStop(TileArea tile_area, DoCommandFlag flags
|
||||||
|
|
||||||
if (RoadTypeIsRoad(rt) && !HasPowerOnRoad(rt, road_rt)) return_cmd_error(STR_ERROR_NO_SUITABLE_ROAD);
|
if (RoadTypeIsRoad(rt) && !HasPowerOnRoad(rt, road_rt)) return_cmd_error(STR_ERROR_NO_SUITABLE_ROAD);
|
||||||
|
|
||||||
if (GetDisallowedRoadDirections(cur_tile) != DRD_NONE) {
|
if (GetDisallowedRoadDirections(cur_tile) != DRD_NONE && road_owner != OWNER_TOWN) {
|
||||||
CommandCost ret = CheckOwnership(road_owner);
|
CommandCost ret = CheckOwnership(road_owner);
|
||||||
if (ret.Failed()) return ret;
|
if (ret.Failed()) return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue