mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-07 06:39:08 +00:00
(svn r20361) -Fix [FS#3989]: Stop vehicle following after zooming out.
This commit is contained in:
parent
cf88a1bc3b
commit
2339b34021
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user