# HG changeset patch # User rubidium # Date 1237236332 0 # Node ID c9c6f23ea1ac0b6f7a25c71c6d2a2b6fb6e0dd2d # Parent 53442463c7c8a129ded7349ef3f9fd2d182f7520 (svn r15747) -Fix [FS#2736]: road ownership getting lost when removing a road stop. diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1632,6 +1632,8 @@ ((GetRoadStopDir(tile) == DIAGDIR_NE) ? ROAD_X : ROAD_Y) : DiagDirToRoadBits(GetRoadStopDir(tile)); + Owner road_owner = GetRoadOwner(tile, ROADTYPE_ROAD); + Owner tram_owner = GetRoadOwner(tile, ROADTYPE_TRAM); CommandCost ret = RemoveRoadStop(st, flags, tile); /* If the stop was a drive-through stop replace the road */ @@ -1640,7 +1642,7 @@ * removed by the owner of the roadstop, _current_company is the * owner of the road stop. */ MakeRoadNormal(tile, road_bits, rts, ClosestTownFromTile(tile, UINT_MAX)->index, - GetRoadOwner(tile, ROADTYPE_ROAD), GetRoadOwner(tile, ROADTYPE_TRAM)); + road_owner, tram_owner); } return ret;