mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'fa/hotfix-ci-failure' into 'master'
Fix rustc warning See merge request veloren/veloren!314
This commit is contained in:
commit
9b99666953
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user