summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-08-04 08:58:45 +0000
committerterkhen <terkhen@openttd.org>2010-08-04 08:58:45 +0000
commit2339b340219824f8a4bc48ae827c1a27906d0a40 (patch)
tree5619b176a77fc2380761fc1a0e57f9ae4cbef996 /src
parentcf88a1bc3b4bda378fc3a1f163facbff220809f5 (diff)
downloadopenttd-2339b340219824f8a4bc48ae827c1a27906d0a40.tar.xz
(svn r20361) -Fix [FS#3989]: Stop vehicle following after zooming out.
Diffstat (limited to 'src')
-rw-r--r--src/main_gui.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 0d1410c95..7d3954699 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -152,6 +152,7 @@ bool DoZoomInOutWindow(ZoomStateChange how, Window *w)
w->viewport->scrollpos_y += vp->virtual_height >> 1;
w->viewport->dest_scrollpos_x = w->viewport->scrollpos_x;
w->viewport->dest_scrollpos_y = w->viewport->scrollpos_y;
+ w->viewport->follow_vehicle = INVALID_VEHICLE;
break;
case ZOOM_OUT:
if (vp->zoom == ZOOM_LVL_MAX) return false;
@@ -164,6 +165,7 @@ bool DoZoomInOutWindow(ZoomStateChange how, Window *w)
vp->virtual_width <<= 1;
vp->virtual_height <<= 1;
+ w->viewport->follow_vehicle = INVALID_VEHICLE;
break;
}
if (vp != NULL) { // the vp can be null when how == ZOOM_NONE