Changeset - r8071:9c162bc0b6a7
[Not reviewed]
master
0 1 0
rubidium - 16 years ago 2007-12-14 21:11:30
rubidium@openttd.org
(svn r11632) -Fix [FS#1541]: vehicles were still followed when sold.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -538,9 +538,9 @@ void Vehicle::PreDestructor()
 
		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;
 
	}
 
}
0 comments (0 inline, 0 general)