From 829883ba1364f8829221103621cdf157f898d1ad Mon Sep 17 00:00:00 2001 From: Steve Goldman Date: Tue, 25 Jun 2024 15:42:32 -0500 Subject: [PATCH] Change: Key scrolling while following a vehicle stops following --- src/window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/window.cpp b/src/window.cpp index 75d02ee713..4ec2d2c968 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2755,6 +2755,10 @@ static void HandleKeyScrolling() */ if (_dirkeys && !EditBoxInGlobalFocus()) { 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); } }