From 57a969017bc6fae18bb4db9867364ceb5ebe260f Mon Sep 17 00:00:00 2001 From: terkhen Date: Thu, 10 Feb 2011 18:32:08 +0000 Subject: (svn r22051) -Fix (r21935): Roads under road stops would get a wrong owner after overbuilding. --- src/station_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 5e72ded7f..4d64b3c03 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1747,6 +1747,8 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin /* Check every tile in the area. */ TILE_AREA_LOOP(cur_tile, roadstop_area) { RoadTypes cur_rts = GetRoadTypes(cur_tile); + Owner road_owner = HasBit(cur_rts, ROADTYPE_ROAD) ? GetRoadOwner(cur_tile, ROADTYPE_ROAD) : _current_company; + Owner tram_owner = HasBit(cur_rts, ROADTYPE_TRAM) ? GetRoadOwner(cur_tile, ROADTYPE_TRAM) : _current_company; if (IsTileType(cur_tile, MP_STATION) && IsRoadStop(cur_tile)) { RemoveRoadStop(cur_tile, flags); @@ -1770,8 +1772,6 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin RoadStopType rs_type = type ? ROADSTOP_TRUCK : ROADSTOP_BUS; if (is_drive_through) { - Owner road_owner = HasBit(cur_rts, ROADTYPE_ROAD) ? GetRoadOwner(cur_tile, ROADTYPE_ROAD) : _current_company; - Owner tram_owner = HasBit(cur_rts, ROADTYPE_TRAM) ? GetRoadOwner(cur_tile, ROADTYPE_TRAM) : _current_company; MakeDriveThroughRoadStop(cur_tile, st->owner, road_owner, tram_owner, st->index, rs_type, rts | cur_rts, DiagDirToAxis(ddir)); road_stop->MakeDriveThrough(); } else { -- cgit v1.2.3-70-g09d2