1
0
Fork 0

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

release/1.0
rubidium 2009-03-16 20:45:32 +00:00
parent 677b157943
commit 7bbdd4f119
1 changed files with 3 additions and 1 deletions

View File

@ -1632,6 +1632,8 @@ CommandCost CmdRemoveRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
((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 @@ CommandCost CmdRemoveRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
* 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;