mirror of https://github.com/OpenRCT2/OpenRCT2.git
Tool tried to act out of bounds, where it shouldn't do anything
This commit is contained in:
parent
c17127f65b
commit
506b06bd73
|
@ -1,7 +1,7 @@
|
|||
0.2.6+ (in development)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [#11231] Change shortcut window list order to be more intuitive, and split it into logical sections.
|
||||
|
||||
- Fix: [#11072] Land and water tools working out of bounds (original bug).
|
||||
|
||||
0.2.6 (2020-04-17)
|
||||
------------------------------------------------------------------------
|
||||
|
|
|
@ -327,6 +327,7 @@ static money32 selection_raise_land(uint8_t flags);
|
|||
static ClearAction GetClearAction();
|
||||
|
||||
static bool _menuDropdownIncludesTwitch;
|
||||
static bool _landToolBlocked;
|
||||
static uint8_t _unkF64F0E;
|
||||
static int16_t _unkF64F0A;
|
||||
// rct2: 0x00F64F15
|
||||
|
@ -3008,12 +3009,20 @@ static void window_top_toolbar_tool_down(rct_window* w, rct_widgetindex widgetIn
|
|||
|
||||
gCurrentToolId = TOOL_UP_DOWN_ARROW;
|
||||
}
|
||||
else
|
||||
{
|
||||
_landToolBlocked = true;
|
||||
}
|
||||
break;
|
||||
case WIDX_WATER:
|
||||
if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)
|
||||
{
|
||||
gCurrentToolId = TOOL_UP_DOWN_ARROW;
|
||||
}
|
||||
else
|
||||
{
|
||||
_landToolBlocked = true;
|
||||
}
|
||||
break;
|
||||
case WIDX_SCENERY:
|
||||
window_top_toolbar_scenery_tool_down(screenCoords.x, screenCoords.y, w, widgetIndex);
|
||||
|
@ -3217,12 +3226,18 @@ static void window_top_toolbar_tool_drag(rct_window* w, rct_widgetindex widgetIn
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_landToolBlocked)
|
||||
{
|
||||
window_top_toolbar_land_tool_drag(screenCoords.x, screenCoords.y);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WIDX_WATER:
|
||||
if (!_landToolBlocked)
|
||||
{
|
||||
window_top_toolbar_water_tool_drag(screenCoords.x, screenCoords.y);
|
||||
}
|
||||
break;
|
||||
case WIDX_SCENERY:
|
||||
if (gWindowSceneryPaintEnabled & 1)
|
||||
|
@ -3239,6 +3254,7 @@ static void window_top_toolbar_tool_drag(rct_window* w, rct_widgetindex widgetIn
|
|||
*/
|
||||
static void window_top_toolbar_tool_up(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
_landToolBlocked = false;
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_LAND:
|
||||
|
@ -3711,6 +3727,7 @@ static void toggle_land_window(rct_window* topToolbar, rct_widgetindex widgetInd
|
|||
}
|
||||
else
|
||||
{
|
||||
_landToolBlocked = false;
|
||||
show_gridlines();
|
||||
tool_set(topToolbar, widgetIndex, TOOL_DIG_DOWN);
|
||||
input_set_flag(INPUT_FLAG_6, true);
|
||||
|
@ -3751,6 +3768,7 @@ static void toggle_water_window(rct_window* topToolbar, rct_widgetindex widgetIn
|
|||
}
|
||||
else
|
||||
{
|
||||
_landToolBlocked = false;
|
||||
show_gridlines();
|
||||
tool_set(topToolbar, widgetIndex, TOOL_WATER_DOWN);
|
||||
input_set_flag(INPUT_FLAG_6, true);
|
||||
|
|
Loading…
Reference in New Issue