mirror of https://github.com/OpenTTD/OpenTTD
(svn r19924) -Fix [FS#3868](r19172): Road/tram ownership was not set correctly when building drive-through stops.
parent
a78acadf3f
commit
f733c3795a
|
@ -1683,8 +1683,6 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||||
bool reuse = (station_to_join != NEW_STATION);
|
bool reuse = (station_to_join != NEW_STATION);
|
||||||
if (!reuse) station_to_join = INVALID_STATION;
|
if (!reuse) station_to_join = INVALID_STATION;
|
||||||
bool distant_join = (station_to_join != INVALID_STATION);
|
bool distant_join = (station_to_join != INVALID_STATION);
|
||||||
Owner tram_owner = _current_company;
|
|
||||||
Owner road_owner = _current_company;
|
|
||||||
|
|
||||||
uint8 width = (uint8)GB(p1, 0, 8);
|
uint8 width = (uint8)GB(p1, 0, 8);
|
||||||
uint8 lenght = (uint8)GB(p1, 8, 8);
|
uint8 lenght = (uint8)GB(p1, 8, 8);
|
||||||
|
@ -1780,6 +1778,9 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||||
|
|
||||||
RoadStopType rs_type = type ? ROADSTOP_TRUCK : ROADSTOP_BUS;
|
RoadStopType rs_type = type ? ROADSTOP_TRUCK : ROADSTOP_BUS;
|
||||||
if (is_drive_through) {
|
if (is_drive_through) {
|
||||||
|
RoadTypes cur_rts = IsNormalRoadTile(cur_tile) ? GetRoadTypes(cur_tile) : ROADTYPES_NONE;
|
||||||
|
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, DiagDirToAxis(ddir));
|
MakeDriveThroughRoadStop(cur_tile, st->owner, road_owner, tram_owner, st->index, rs_type, rts, DiagDirToAxis(ddir));
|
||||||
road_stop->MakeDriveThrough();
|
road_stop->MakeDriveThrough();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue