From 8922fd949f00d7eb7c84bf5e287e549c1dd0c28b Mon Sep 17 00:00:00 2001 From: Treeco <5021038-Treeco@users.noreply.gitlab.com> Date: Sun, 22 Nov 2020 22:35:31 +0000 Subject: [PATCH] Make zooming in then back out return to the previous zoom level --- voxygen/src/hud/map.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voxygen/src/hud/map.rs b/voxygen/src/hud/map.rs index d94c2d770f..357226b643 100644 --- a/voxygen/src/hud/map.rs +++ b/voxygen/src/hud/map.rs @@ -308,8 +308,8 @@ impl<'a> Widget for Map<'a> { .map(|scroll| scroll.y) .sum(); let new_zoom_lvl = (self.global_state.settings.gameplay.map_zoom - * (1.0 + scrolled * 0.05 * PLATFORM_FACTOR)) - .clamped(0.75, max_zoom / 64.0); + * (scrolled * 0.05 * PLATFORM_FACTOR).exp2()) + .clamped(0.75, max_zoom / 64.0); events.push(Event::MapZoom(new_zoom_lvl as f64)); // Icon settings // Alignment