Merge branch 'master' into jgrpp
# Conflicts: # src/gamelog.cpp
This commit is contained in:
@@ -732,7 +732,6 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
||||
default: {
|
||||
/* Will there be flat water on the lower halftile? */
|
||||
bool water_ground = IsTileType(tile, MP_WATER) && IsSlopeWithOneCornerRaised(tileh);
|
||||
bool docking = IsPossibleDockingTile(tile) && IsDockingTile(tile);
|
||||
|
||||
CommandCost ret = CheckRailSlope(tileh, trackbit, TRACK_BIT_NONE, tile);
|
||||
if (ret.Failed()) return ret;
|
||||
@@ -751,7 +750,7 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
||||
MakeRailNormal(tile, _current_company, trackbit, railtype);
|
||||
if (water_ground) {
|
||||
SetRailGroundType(tile, RAIL_GROUND_WATER);
|
||||
SetDockingTile(tile, docking);
|
||||
if (IsPossibleDockingTile(tile)) CheckForDockingTile(tile);
|
||||
}
|
||||
Company::Get(_current_company)->infrastructure.rail[railtype]++;
|
||||
DirtyCompanyInfrastructureWindows(_current_company);
|
||||
@@ -2351,7 +2350,11 @@ static CommandCost ClearTile_Track(TileIndex tile, DoCommandFlag flags)
|
||||
if (_game_mode != GM_EDITOR && !_settings_game.construction.enable_remove_water && !(flags & DC_ALLOW_REMOVE_WATER)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
|
||||
|
||||
/* The track was removed, and left a coast tile. Now also clear the water. */
|
||||
if (flags & DC_EXEC) DoClearSquare(tile);
|
||||
if (flags & DC_EXEC) {
|
||||
bool remove = IsDockingTile(tile);
|
||||
DoClearSquare(tile);
|
||||
if (remove) RemoveDockingTile(tile);
|
||||
}
|
||||
cost.AddCost(_price[PR_CLEAR_WATER]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user