Mercurial > hg > openttd
changeset 6928:9c9cc4e1f94b draft
(svn r10181) -Fix (r10093): clamp the zoom level so it won't try to use a wrong zoom level when loading an old savegame.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 17 Jun 2007 13:27:50 +0000 |
parents | c002ba1f313b |
children | bb43858bed10 |
files | src/openttd.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1306,7 +1306,7 @@ 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);