diff -r 17ad53748c7b -r eb8f1b5b2883 src/window.cpp --- a/src/window.cpp Fri Oct 19 22:46:55 2007 +0000 +++ b/src/window.cpp Sat Oct 20 00:09:39 2007 +0000 @@ -1466,6 +1466,13 @@ w = FindWindowFromPt(_cursor.pos.x, _cursor.pos.y); + if (WP(w, vp_d).follow_vehicle != INVALID_VEHICLE && w == FindWindowById(WC_MAIN_WINDOW, 0)) { + /* If the main window is following a vehicle, then first let go of it! */ + const Vehicle *veh = GetVehicle(WP(w, vp_d).follow_vehicle); + ScrollMainWindowTo(veh->x_pos, veh->y_pos, true); /* This also resets follow_vehicle */ + return true; + } + if (!(_right_button_down || scrollwheel_scrolling) || w == NULL) { _cursor.fix_at = false; _scrolling_viewport = false;