From e33deac7402dcdae312db0cfb1c812827545ba25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Korg=C3=B3l?= Date: Wed, 24 Jul 2019 15:02:52 +0200 Subject: [PATCH] Change FP Mode distance to 0.1 to fix building --- voxygen/src/scene/camera.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/voxygen/src/scene/camera.rs b/voxygen/src/scene/camera.rs index 32daf49a6d..2bbcb02bc5 100644 --- a/voxygen/src/scene/camera.rs +++ b/voxygen/src/scene/camera.rs @@ -116,7 +116,7 @@ impl Camera { pub fn zoom_by(&mut self, delta: f32) { if self.can_zoom { // Clamp camera dist to the 0 <= x <= infinity range - self.tgt_dist = (self.tgt_dist + delta).max(2.0); + self.tgt_dist = (self.tgt_dist + delta).max(2.0).min(100.0); } } @@ -176,12 +176,12 @@ impl Camera { match self.mode { CameraMode::ThirdPerson => { self.can_zoom = true; - if self.tgt_dist == 0.0 { + if self.tgt_dist == 0.1 { self.zoom_by(5.0); } }, CameraMode::FirstPerson => { - self.set_distance(0.0); + self.set_distance(0.1); self.can_zoom = false; }, }