summaryrefslogtreecommitdiff
path: root/vehicle_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'vehicle_gui.c')
-rw-r--r--vehicle_gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 35aef4581..bff8ec1b1 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -1099,7 +1099,7 @@ void ChangeVehicleViewWindow(const Vehicle *from_v, const Vehicle *to_v)
if (w != NULL) {
w->window_number = to_v->index;
- WP(w, vp_d).follow_vehicle = (VehicleID)(w->window_number & 0xFFFF);
+ WP(w, vp_d).follow_vehicle = to_v->index; // tell the viewport to follow the new vehicle
SetWindowDirty(w);
w = FindWindowById(WC_VEHICLE_ORDERS, from_v->index);