(svn r11417) -Fix[FS#1421]: Let the main viewport stay where the vehicle was last seen while been center-followed
authorbelugas
Mon, 12 Nov 2007 01:12:32 +0000
changeset 8363 2ec71a6debd1
parent 8362 6b3ddf7a6a99
child 8364 1ce2fc624842
(svn r11417) -Fix[FS#1421]: Let the main viewport stay where the vehicle was last seen while been center-followed
src/vehicle.cpp
--- a/src/vehicle.cpp	Mon Nov 12 01:05:35 2007 +0000
+++ b/src/vehicle.cpp	Mon Nov 12 01:12:32 2007 +0000
@@ -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;
 		}
 	}