mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 14:24:33 +01:00
Shaking while at the edge of the map has been completely eliminated. In order to do this, comparison with tile height was also removed which fixed a few outlier cases. The main cause was viewport axis were only being set if it's respective isometric axis was at the boundary, instead of either isometric axis. Viewport no longer gets stuck which was related to the shaking in the end. (#2875) Refactored viewport_update_position. I moved viewport_set_underground_flag above the bounds checking function since it had no relation to it. (#996, #2589) Scrolling on the map edge with arrow keys or mouse edge will now go the same speed in both directions. (#2254) Added changelog entry.
This commit is contained in:
committed by
Michael Steenbeek
parent
27e3703fec
commit
4c3065619e
@@ -101,17 +101,7 @@ static void game_handle_key_scroll()
|
||||
const uint8 * keysState = context_get_keys_state();
|
||||
get_keyboard_map_scroll(keysState, &scrollX, &scrollY);
|
||||
|
||||
// Scroll viewport
|
||||
if (scrollX != 0)
|
||||
{
|
||||
mainWindow->saved_view_x += scrollX * (12 << mainWindow->viewport->zoom);
|
||||
input_set_flag(INPUT_FLAG_VIEWPORT_SCROLLING, true);
|
||||
}
|
||||
if (scrollY != 0)
|
||||
{
|
||||
mainWindow->saved_view_y += scrollY * (12 << mainWindow->viewport->zoom);
|
||||
input_set_flag(INPUT_FLAG_VIEWPORT_SCROLLING, true);
|
||||
}
|
||||
input_scroll_viewport(scrollX, scrollY);
|
||||
}
|
||||
|
||||
static sint32 input_scancode_to_rct_keycode(sint32 sdl_key)
|
||||
|
||||
Reference in New Issue
Block a user