1
0
Fork 0

Change: Key scrolling while following a vehicle stops following

pull/12808/head
Steve Goldman 2024-06-25 15:42:32 -05:00
parent 56a51488af
commit 829883ba13
1 changed files with 4 additions and 0 deletions

View File

@ -2755,6 +2755,10 @@ static void HandleKeyScrolling()
*/ */
if (_dirkeys && !EditBoxInGlobalFocus()) { if (_dirkeys && !EditBoxInGlobalFocus()) {
int factor = _shift_pressed ? 50 : 10; int factor = _shift_pressed ? 50 : 10;
/* Key scrolling stops following a vehicle. */
GetMainWindow()->viewport->follow_vehicle = INVALID_VEHICLE;
ScrollMainViewport(scrollamt[_dirkeys][0] * factor, scrollamt[_dirkeys][1] * factor); ScrollMainViewport(scrollamt[_dirkeys][0] * factor, scrollamt[_dirkeys][1] * factor);
} }
} }