diff options
author | belugas <belugas@openttd.org> | 2007-11-12 01:12:32 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2007-11-12 01:12:32 +0000 |
commit | 8e7111491cf4f2078665adc47376184504ca3869 (patch) | |
tree | 24a1b850724dd359aff06d2a859b807375303016 | |
parent | 542697a28a1ee9d5520b4ef10ea88eeefbf1322f (diff) | |
download | openttd-8e7111491cf4f2078665adc47376184504ca3869.tar.xz |
(svn r11417) -Fix[FS#1421]: Let the main viewport stay where the vehicle was last seen while been center-followed
-rw-r--r-- | src/vehicle.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index eb655b49b..3288c2dc8 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -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; } } |