Mercurial > hg > openttd
changeset 8071:3875060e458c draft
(svn r11632) -Fix [FS#1541]: vehicles were still followed when sold.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Fri, 14 Dec 2007 21:11:30 +0000 |
parents | 35ff452cee80 |
children | 0cba7093ca14 |
files | src/vehicle.cpp |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -538,9 +538,9 @@ delete this->Next(); } - Window *w = FindWindowById(WC_VEHICLE_VIEW, this->index); - if (w != 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 + Window *w = FindWindowById(WC_MAIN_WINDOW, 0); + if (WP(w, vp_d).follow_vehicle == this->index) { + ScrollMainWindowTo(this->x_pos, this->y_pos, true); // lock the main view on the vehicle's last position WP(w, vp_d).follow_vehicle = INVALID_VEHICLE; } }