Feature: Trains with an engine on the rear drive backwards when reversing

This commit is contained in:
Tyler Trahan
2026-04-13 21:52:22 -04:00
parent 76c277805d
commit 2b530751dd
23 changed files with 640 additions and 476 deletions
+1 -1
View File
@@ -2471,7 +2471,7 @@ static EventState HandleViewportScroll()
if (_last_scroll_window == GetMainWindow() && _last_scroll_window->viewport->follow_vehicle != VehicleID::Invalid()) {
/* If the main window is following a vehicle, then first let go of it! */
const Vehicle *veh = Vehicle::Get(_last_scroll_window->viewport->follow_vehicle);
const Vehicle *veh = Vehicle::Get(_last_scroll_window->viewport->follow_vehicle)->GetMovingFront();
ScrollMainWindowTo(veh->x_pos, veh->y_pos, veh->z_pos, true); // This also resets follow_vehicle
return ES_NOT_HANDLED;
}