diff -r 2fe73e3c3629 -r 10b44714b85d src/road_cmd.cpp --- a/src/road_cmd.cpp Fri Feb 23 00:10:16 2007 +0000 +++ b/src/road_cmd.cpp Fri Feb 23 00:17:46 2007 +0000 @@ -35,11 +35,10 @@ } -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 @@ // 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 @@ 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