1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00

Fix #22209: Water tool selection may disappear near edge of map (#22256)

This commit is contained in:
mrmbernardi
2024-07-22 06:32:23 +10:00
committed by GitHub
parent 0c318a416e
commit bdb4823d48
2 changed files with 6 additions and 7 deletions

View File

@@ -13,6 +13,7 @@
- Fix: [#19210] The load/save window executes the loading code twice, resulting in a slowdown.
- Fix: [#22056] Potential crash upon exiting the game.
- Fix: [#22208] Cursor may fail to register hits in some cases (original bug).
- Fix: [#22209] Water tool selection may disappear near edge of map.
- Fix: [#22222] Staff list may remain invalid when changing tabs.
- Fix: [#22284] Unrated rides cause high amount of nausea.
- Fix: [#22304] Graphs don't draw lines on the left edge of the screen.

View File

@@ -790,7 +790,7 @@ namespace OpenRCT2::Ui::Windows
return;
}
auto mapTile = info.Loc.ToTileCentre();
auto mapTile = info.Loc;
uint8_t state_changed = 0;
@@ -806,14 +806,12 @@ namespace OpenRCT2::Ui::Windows
state_changed++;
}
int16_t tool_size = std::max<uint16_t>(1, gLandToolSize);
int16_t tool_length = (tool_size - 1) * 32;
uint16_t tool_size = std::max<uint16_t>(1, gLandToolSize);
uint16_t tool_length = (tool_size - 1) * COORDS_XY_STEP;
// Move to tool bottom left
mapTile.x -= (tool_size - 1) * 16;
mapTile.y -= (tool_size - 1) * 16;
mapTile.x &= 0xFFE0;
mapTile.y &= 0xFFE0;
mapTile.x -= tool_length / 2;
mapTile.y -= tool_length / 2;
if (gMapSelectPositionA.x != mapTile.x)
{