Simplify direction lookup to also work for oil rigs.
(cherry picked from commit acbff5528b6aa5a01d17b814a44b6d884ee03f69)
This commit is contained in:

committed by
Jonathan G Rennison

parent
1d3cf59d8a
commit
e3b33b45c9
@@ -325,9 +325,7 @@ TileIndex Ship::GetOrderStationLocation(StationID station)
|
||||
} else {
|
||||
const Dock* dock = GetBestDock(this, st);
|
||||
|
||||
DiagDirection direction = GetInclinedSlopeDirection(GetTileSlope(dock->sloped));
|
||||
direction = ReverseDiagDir(direction);
|
||||
|
||||
DiagDirection direction = DiagdirBetweenTiles(dock->sloped, dock->flat);
|
||||
return dock->flat + TileOffsByDiagDir(direction);
|
||||
}
|
||||
} else {
|
||||
|
@@ -2704,9 +2704,7 @@ static CommandCost RemoveDock(TileIndex tile, DoCommandFlag flags)
|
||||
TileIndex tile1 = removing_dock->sloped;
|
||||
TileIndex tile2 = removing_dock->flat;
|
||||
|
||||
DiagDirection direction = GetInclinedSlopeDirection(GetTileSlope(removing_dock->sloped));
|
||||
direction = ReverseDiagDir(direction);
|
||||
|
||||
DiagDirection direction = DiagdirBetweenTiles(removing_dock->sloped, removing_dock->flat);
|
||||
TileIndex docking_location = removing_dock->flat + TileOffsByDiagDir(direction);
|
||||
|
||||
ret = EnsureNoVehicleOnGround(tile1);
|
||||
|
Reference in New Issue
Block a user