summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-17 13:01:30 +0000
committerrubidium <rubidium@openttd.org>2008-05-17 13:01:30 +0000
commitad6e52080c8ed09306e0f6603bb69d8af0310892 (patch)
tree46351975e7a6b7a08ca8eedc476a4109e9a1b776 /src/vehicle.cpp
parenta89b5721a8bff2a601161a1dc456f588c065b0eb (diff)
downloadopenttd-ad6e52080c8ed09306e0f6603bb69d8af0310892.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.cpp7
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()