diff options
author | rubidium <rubidium@openttd.org> | 2008-05-17 13:01:30 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-17 13:01:30 +0000 |
commit | 87015f5b6395f15a624f67e25dce10fe52a12c81 (patch) | |
tree | 46351975e7a6b7a08ca8eedc476a4109e9a1b776 /src/vehicle.cpp | |
parent | 8b5421290027ab67cba25225111e3561ddd7af07 (diff) | |
download | openttd-87015f5b6395f15a624f67e25dce10fe52a12c81.tar.xz |
(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.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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() |