summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/station.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/station.cpp b/src/station.cpp
index 5f60c7a2a..14ac504a8 100644
--- a/src/station.cpp
+++ b/src/station.cpp
@@ -571,7 +571,7 @@ CommandCost StationRect::BeforeAddRect(TileIndex tile, int w, int h, StationRect
{
/* Станция может находится на любом уровне.
* Значит надо обойти все слои */
- TileArea ta(TileXY(left_a, top_a), TileXY(right_a, bottom_a));
+ TileArea ta(TopTile(TileXY(left_a, top_a)), TopTile(TileXY(right_a, bottom_a)));
FOR_ALL_LAYERS(layer) {
ta.tile = TopTile(ta.tile) + layer * LayerSize();
@@ -594,10 +594,10 @@ bool StationRect::AfterRemoveTile(BaseStation *st, TileIndex tile)
* do it until we have empty rect or nothing to do */
for (;;) {
/* check if removed tile is on rect edge */
- bool left_edge = (x == this->left);
- bool right_edge = (x == this->right);
- bool top_edge = (y == this->top);
- bool bottom_edge = (y == this->bottom);
+ bool left_edge = (x == TopTile(this->left));
+ bool right_edge = (x == TopTile(this->right));
+ bool top_edge = (y == TopTile(this->top));
+ bool bottom_edge = (y == TopTile(this->bottom));
/* can we reduce the rect in either direction? */
bool reduce_x = ((left_edge || right_edge) && !ScanForStationTiles(st->index, x, this->top, x, this->bottom));