From 4e4b152adb9e4fed758748622c66991be2aad730 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 17 Jun 2007 13:27:50 +0000 Subject: (svn r10181) -Fix (r10093): clamp the zoom level so it won't try to use a wrong zoom level when loading an old savegame. --- src/openttd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2