1
0
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:
belugas
2007-11-12 01:12:32 +00:00
parent 3904640d02
commit 2571f02594

View File

@@ -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;
}
}