From ad6e52080c8ed09306e0f6603bb69d8af0310892 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 17 May 2008 13:01:30 +0000 Subject: (svn r13140) -Codechange: move the gui-list-sorting out of window_gui.h so window_gui.h only needs to be included in *_gui.cpp. --- src/vehicle.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/vehicle.cpp') diff --git a/src/vehicle.cpp b/src/vehicle.cpp index b559a8fc7..53a38e239 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -590,11 +590,8 @@ void Vehicle::PreDestructor() delete this->Next(); } - Window *w = FindWindowById(WC_MAIN_WINDOW, 0); - if (w != NULL && w->viewport->follow_vehicle == this->index) { - ScrollMainWindowTo(this->x_pos, this->y_pos, true); // lock the main view on the vehicle's last position - w->viewport->follow_vehicle = INVALID_VEHICLE; - } + extern void StopGlobalFollowVehicle(const Vehicle *v); + StopGlobalFollowVehicle(this); } Vehicle::~Vehicle() -- cgit v1.2.3-54-g00ecf