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

This commit is contained in:
mrmbernardi authored and GitHub committed 2024-07-21 20:32:23 +00:00
1 parent 0c318a416e
commit bdb4823d48
2 files changed
+6 -7

No files matched your search

+1
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.
+5 -7
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)
{