(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
1 changed files with 1 additions and 0 deletions

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