mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
Fix #8119, f538179
: Update docking tile area when placing a diagonal rail next to a dock end (#8124)
This commit is contained in:
parent
61e1a45100
commit
a95fbd59a3
@ -568,7 +568,6 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
|||||||
default: {
|
default: {
|
||||||
/* Will there be flat water on the lower halftile? */
|
/* Will there be flat water on the lower halftile? */
|
||||||
bool water_ground = IsTileType(tile, MP_WATER) && IsSlopeWithOneCornerRaised(tileh);
|
bool water_ground = IsTileType(tile, MP_WATER) && IsSlopeWithOneCornerRaised(tileh);
|
||||||
bool docking = IsPossibleDockingTile(tile) && IsDockingTile(tile);
|
|
||||||
|
|
||||||
CommandCost ret = CheckRailSlope(tileh, trackbit, TRACK_BIT_NONE, tile);
|
CommandCost ret = CheckRailSlope(tileh, trackbit, TRACK_BIT_NONE, tile);
|
||||||
if (ret.Failed()) return ret;
|
if (ret.Failed()) return ret;
|
||||||
@ -587,7 +586,7 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
|||||||
MakeRailNormal(tile, _current_company, trackbit, railtype);
|
MakeRailNormal(tile, _current_company, trackbit, railtype);
|
||||||
if (water_ground) {
|
if (water_ground) {
|
||||||
SetRailGroundType(tile, RAIL_GROUND_WATER);
|
SetRailGroundType(tile, RAIL_GROUND_WATER);
|
||||||
SetDockingTile(tile, docking);
|
if (IsPossibleDockingTile(tile)) CheckForDockingTile(tile);
|
||||||
}
|
}
|
||||||
Company::Get(_current_company)->infrastructure.rail[railtype]++;
|
Company::Get(_current_company)->infrastructure.rail[railtype]++;
|
||||||
DirtyCompanyInfrastructureWindows(_current_company);
|
DirtyCompanyInfrastructureWindows(_current_company);
|
||||||
|
Loading…
Reference in New Issue
Block a user