changeset 7867:118025b3553f draft

(svn r11417) -Fix[FS#1421]: Let the main viewport stay where the vehicle was last seen while been center-followed
author belugas <belugas@openttd.org>
date Mon, 12 Nov 2007 01:12:32 +0000
parents b0108d3156da
children 3ee1134b5a85
files src/vehicle.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -541,6 +541,7 @@
 	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;
 		}
 	}