(svn r8852) -Fix (r8735): make the dynamite tool for drive through road stops as if it were removing a normal road tile (consider the local authority and such).
-Fix (r8735): remove drive through road stops on town owned roads when going bankrupt/being removed.
This commit is contained in:
@@ -35,11 +35,10 @@ static uint CountRoadBits(RoadBits r)
|
||||
}
|
||||
|
||||
|
||||
static bool CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, bool* edge_road)
|
||||
bool CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, Owner owner, bool *edge_road)
|
||||
{
|
||||
RoadBits present;
|
||||
RoadBits n;
|
||||
Owner owner;
|
||||
*edge_road = true;
|
||||
|
||||
if (_game_mode == GM_EDITOR) return true;
|
||||
@@ -47,8 +46,6 @@ static bool CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, bool* edge_roa
|
||||
// Only do the special processing for actual players.
|
||||
if (!IsValidPlayer(_current_player)) return true;
|
||||
|
||||
owner = IsLevelCrossingTile(tile) ? GetCrossingRoadOwner(tile) : GetTileOwner(tile);
|
||||
|
||||
// Only do the special processing if the road is owned
|
||||
// by a town
|
||||
if (owner != OWNER_TOWN) return (owner == OWNER_NONE) || CheckOwnership(owner);
|
||||
@@ -81,6 +78,10 @@ static bool CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, bool* edge_roa
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, bool *edge_road)
|
||||
{
|
||||
return CheckAllowRemoveRoad(tile, remove, IsLevelCrossingTile(tile) ? GetCrossingRoadOwner(tile) : GetTileOwner(tile), edge_road);
|
||||
}
|
||||
|
||||
/** Delete a piece of road.
|
||||
* @param tile tile where to remove road from
|
||||
|
Reference in New Issue
Block a user