diff options
author | smatz <smatz@openttd.org> | 2009-03-15 15:25:18 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-03-15 15:25:18 +0000 |
commit | d28895c88ba94541c3e32a0d6f5b5981a8427368 (patch) | |
tree | c041152a492c41b5020c575b6fde72be6dc3a5b8 /src/vehicle_gui.cpp | |
parent | 57c5ce84eb401c006c326317859d1bc76d1c3399 (diff) | |
download | openttd-d28895c88ba94541c3e32a0d6f5b5981a8427368.tar.xz |
(svn r15725) -Fix: centering on a vehicle didn't respect its z coordinate
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 4d5801417..97d4df34e 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1957,7 +1957,7 @@ struct VehicleViewWindow : Window { if (_ctrl_pressed && mainwindow->viewport->zoom == ZOOM_LVL_NORMAL) { mainwindow->viewport->follow_vehicle = v->index; } else { - ScrollMainWindowTo(v->x_pos, v->y_pos); + ScrollMainWindowTo(v->x_pos, v->y_pos, v->z_pos); } } break; @@ -2037,7 +2037,7 @@ void StopGlobalFollowVehicle(const Vehicle *v) { Window *w = FindWindowById(WC_MAIN_WINDOW, 0); if (w != NULL && w->viewport->follow_vehicle == v->index) { - ScrollMainWindowTo(v->x_pos, v->y_pos, true); // lock the main view on the vehicle's last position + ScrollMainWindowTo(v->x_pos, v->y_pos, v->z_pos, true); // lock the main view on the vehicle's last position w->viewport->follow_vehicle = INVALID_VEHICLE; } } |