1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix #5865: input being handled too early (#6020)

This commit is contained in:
ζeh Matt
2017-07-29 10:48:54 +02:00
committed by Ted John
parent 8c48b5a249
commit b2b808f25e
2 changed files with 21 additions and 20 deletions

View File

@@ -11,6 +11,7 @@
- Fix: [#5629] Issue with tower ride modes approach to station - incorrect sum caused sawtooth in velocity
- Fix: [#5768] Prevent loading non-existent title sequences.
- Fix: [#5858] Crash when using custom ride with no colour presets.
- Fix: [#5865] Ride preview flickering on uneven terrain or mid air.
- Fix: [#5872] Incorrect OpenGL rendering of masked sprites
- Fix: [#5880] Leaving bumper cars without building causes assertion.
- Fix: [#5912] Negative queue when moving entrance in paused state.

View File

@@ -284,7 +284,7 @@ void game_update()
{
gInUpdateCode = true;
sint32 i, numUpdates;
sint32 numUpdates;
// 0x006E3AEC // screen_game_process_mouse_input();
screenshot_check();
@@ -317,6 +317,25 @@ void game_update()
network_process_game_commands();
}
// Update the game one or more times
for (sint32 i = 0; i < numUpdates; i++) {
game_logic_update();
if (gGameSpeed > 1)
continue;
if (input_get_state() == INPUT_STATE_RESET ||
input_get_state() == INPUT_STATE_NORMAL
) {
if (input_test_flag(INPUT_FLAG_VIEWPORT_SCROLLING)) {
input_set_flag(INPUT_FLAG_VIEWPORT_SCROLLING, false);
break;
}
} else {
break;
}
}
if (!gOpenRCT2Headless)
{
input_set_flag(INPUT_FLAG_VIEWPORT_SCROLLING, false);
@@ -347,25 +366,6 @@ void game_update()
game_handle_input();
}
// Update the game one or more times
for (i = 0; i < numUpdates; i++) {
game_logic_update();
if (gGameSpeed > 1)
continue;
if (input_get_state() == INPUT_STATE_RESET ||
input_get_state() == INPUT_STATE_NORMAL
) {
if (input_test_flag(INPUT_FLAG_VIEWPORT_SCROLLING)) {
input_set_flag(INPUT_FLAG_VIEWPORT_SCROLLING, false);
break;
}
} else {
break;
}
}
// Always perform autosave check, even when paused
if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) &&
!(gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) &&