diff options
author | rubidium <rubidium@openttd.org> | 2007-06-17 13:27:50 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-06-17 13:27:50 +0000 |
commit | 4e4b152adb9e4fed758748622c66991be2aad730 (patch) | |
tree | 18e58a81e4561b861e81298d76f725f85fe2f88a /src | |
parent | 7fbd4e4ab4c062f7501521cd784fb25abdd88fec (diff) | |
download | openttd-4e4b152adb9e4fed758748622c66991be2aad730.tar.xz |
(svn r10181) -Fix (r10093): clamp the zoom level so it won't try to use a wrong zoom level when loading an old savegame.
Diffstat (limited to 'src')
-rw-r--r-- | src/openttd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index 72dc622db..22302146b 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1306,7 +1306,7 @@ bool AfterLoadGame() WP(w,vp_d).dest_scrollpos_y = _saved_scrollpos_y; vp = w->viewport; - vp->zoom = _saved_scrollpos_zoom; + vp->zoom = (ZoomLevel)min(_saved_scrollpos_zoom, ZOOM_LVL_MAX); vp->virtual_width = ScaleByZoom(vp->width, vp->zoom); vp->virtual_height = ScaleByZoom(vp->height, vp->zoom); |