summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
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()