mirror of https://github.com/OpenTTD/OpenTTD.git
(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:
parent
3904640d02
commit
2571f02594
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue