mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-01 10:59:12 +00:00
(svn r11417) -Fix[FS#1421]: Let the main viewport stay where the vehicle was last seen while been center-followed
This commit is contained in:
@@ -541,6 +541,7 @@ void Vehicle::PreDestructor()
|
||||
FOR_ALL_WINDOWS(wp) {
|
||||
Window *w = *wp;
|
||||
if (w->viewport != NULL && WP(w, vp_d).follow_vehicle == this->index) {
|
||||
ScrollMainWindowTo(this->x_pos, this->y_pos); // lock the main view on the vehicle's last position
|
||||
WP(w, vp_d).follow_vehicle = INVALID_VEHICLE;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user