@@ -2269,12 +2269,12 @@ static Vehicle *UpdateRoadVehPowerProc(V
}
/**
* Checks the tile and returns whether the current player is allowed to convert the roadtype to another roadtype
* Checks the tile and returns whether the current player is allowed to convert the roadtype to another roadtype without taking ownership
* @param owner the tile owner.
* @param rtt Road/tram type.
* @return whether the road is convertible
*/
static bool CanConvertRoadType(Owner owner, RoadTramType rtt)
static bool CanConvertUnownedRoadType(Owner owner, RoadTramType rtt)
{
return (owner == OWNER_NONE || (owner == OWNER_TOWN && rtt == RTT_ROAD));
@@ -2370,7 +2370,7 @@ CommandCost CmdConvertRoad(TileIndex til
/* Trying to convert other's road */
Owner owner = GetRoadOwner(tile, rtt);
if (!CanConvertRoadType(owner, rtt)) {
if (!CanConvertUnownedRoadType(owner, rtt)) {
CommandCost ret = CheckOwnership(owner, tile);
if (ret.Failed()) {
error = ret;
@@ -2400,7 +2400,7 @@ CommandCost CmdConvertRoad(TileIndex til
if (flags & DC_EXEC) { // we can safely convert, too
/* Update the company infrastructure counters. */
if (!IsRoadStopTile(tile) && CanConvertRoadType(owner, rtt) && owner != OWNER_TOWN) {
if (!IsRoadStopTile(tile) && owner == _current_company) {
ConvertRoadTypeOwner(tile, num_pieces, owner, from_type, to_type);
@@ -2447,7 +2447,7 @@ CommandCost CmdConvertRoad(TileIndex til
if (flags & DC_EXEC) {
if (CanConvertRoadType(owner, rtt) && owner != OWNER_TOWN) {
if (owner == _current_company) {
ConvertRoadTypeOwner(endtile, num_pieces, owner, from_type, to_type);
SetTunnelBridgeOwner(tile, endtile, _current_company);
Status change: