summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 58fff0971..5d8762319 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -991,8 +991,8 @@ static void ScrollMainViewport(int x, int y)
Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
assert(w);
- WP(w,vp_d).scrollpos_x += ScaleByZoom(x, w->viewport->zoom);
- WP(w,vp_d).scrollpos_y += ScaleByZoom(y, w->viewport->zoom);
+ WP(w,vp_d).dest_scrollpos_x += ScaleByZoom(x, w->viewport->zoom);
+ WP(w,vp_d).dest_scrollpos_y += ScaleByZoom(y, w->viewport->zoom);
}
}
@@ -1284,6 +1284,8 @@ bool AfterLoadGame()
WP(w,vp_d).scrollpos_x = _saved_scrollpos_x;
WP(w,vp_d).scrollpos_y = _saved_scrollpos_y;
+ WP(w,vp_d).dest_scrollpos_x = _saved_scrollpos_x;
+ WP(w,vp_d).dest_scrollpos_y = _saved_scrollpos_y;
vp = w->viewport;
vp->zoom = _saved_scrollpos_zoom;