Merge branch 'fa/hotfix-ci-failure' into 'master'

Fix rustc warning

See merge request veloren/veloren!314
This commit is contained in:
Imbris 2019-07-07 04:37:22 +00:00
commit 9b99666953

View File

@ -176,22 +176,14 @@ impl PlayState for SessionState {
let cam_dir = let cam_dir =
(self.scene.camera().get_focus_pos() - cam_pos).normalized(); (self.scene.camera().get_focus_pos() - cam_pos).normalized();
let (d, block) = { if let Ok(Some(block)) = client
let terrain = client.state().terrain(); .state()
let ray = .terrain()
terrain.ray(cam_pos, cam_pos + cam_dir * 100.0).cast(); .ray(cam_pos, cam_pos + cam_dir * 100.0)
( .cast()
ray.0, .1
if let Ok(Some(b)) = ray.1 { {
Some(*b) self.selected_block = *block;
} else {
None
},
)
};
if let Some(block) = block {
self.selected_block = block;
} }
} }
} else { } else {