1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-01 02:49:10 +00:00

(svn r15747) -Fix [FS#2736]: road ownership getting lost when removing a road stop.

This commit is contained in:
rubidium
2009-03-16 20:45:32 +00:00
parent 677b157943
commit 7bbdd4f119

View File

@@ -1632,6 +1632,8 @@ CommandCost CmdRemoveRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
((GetRoadStopDir(tile) == DIAGDIR_NE) ? ROAD_X : ROAD_Y) : ((GetRoadStopDir(tile) == DIAGDIR_NE) ? ROAD_X : ROAD_Y) :
DiagDirToRoadBits(GetRoadStopDir(tile)); DiagDirToRoadBits(GetRoadStopDir(tile));
Owner road_owner = GetRoadOwner(tile, ROADTYPE_ROAD);
Owner tram_owner = GetRoadOwner(tile, ROADTYPE_TRAM);
CommandCost ret = RemoveRoadStop(st, flags, tile); CommandCost ret = RemoveRoadStop(st, flags, tile);
/* If the stop was a drive-through stop replace the road */ /* If the stop was a drive-through stop replace the road */
@@ -1640,7 +1642,7 @@ CommandCost CmdRemoveRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
* removed by the owner of the roadstop, _current_company is the * removed by the owner of the roadstop, _current_company is the
* owner of the road stop. */ * owner of the road stop. */
MakeRoadNormal(tile, road_bits, rts, ClosestTownFromTile(tile, UINT_MAX)->index, MakeRoadNormal(tile, road_bits, rts, ClosestTownFromTile(tile, UINT_MAX)->index,
GetRoadOwner(tile, ROADTYPE_ROAD), GetRoadOwner(tile, ROADTYPE_TRAM)); road_owner, tram_owner);
} }
return ret; return ret;