mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r10181) -Fix (r10093): clamp the zoom level so it won't try to use a wrong zoom level when loading an old savegame.
This commit is contained in:
parent
6c67bdcc71
commit
5fdde681c2
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user