mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
review fixes
This commit is contained in:
parent
0ba58d8785
commit
aca38d0cf4
@ -322,7 +322,7 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv
|
||||
// TODO: Abstract this code into a generalised way to do block updates?
|
||||
if matches!(
|
||||
block.get_sprite(),
|
||||
Some(SpriteKind::Keyhole) | Some(SpriteKind::BoneKeyhole)
|
||||
Some(SpriteKind::Keyhole | SpriteKind::BoneKeyhole)
|
||||
) {
|
||||
let dirs = [
|
||||
Vec3::unit_x(),
|
||||
|
@ -113,7 +113,7 @@ impl Animation for AlphaAnimation {
|
||||
next.tail.orientation = Quaternion::rotation_x(0.05 * fastalt * speednormcancel)
|
||||
* Quaternion::rotation_z(fast * 0.15 * speednormcancel);
|
||||
},
|
||||
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Pick) => {
|
||||
Some(ToolKind::Axe | ToolKind::Hammer | ToolKind::Pick) => {
|
||||
next.head.orientation = Quaternion::rotation_z(move1abs * 0.3 + move2abs * -0.6);
|
||||
next.control_l.position = Vec3::new(2.0 - s_a.grip.0 * 2.0, 1.0, 3.0);
|
||||
next.control_r.position = Vec3::new(
|
||||
|
@ -167,7 +167,7 @@ impl Animation for WieldAnimation {
|
||||
* Quaternion::rotation_y(-0.2 * speednorm)
|
||||
* Quaternion::rotation_z(0.5);
|
||||
},
|
||||
Some(ToolKind::Axe) | Some(ToolKind::Hammer | ToolKind::Pick) => {
|
||||
Some(ToolKind::Axe | ToolKind::Hammer | ToolKind::Pick) => {
|
||||
next.control_l.position = Vec3::new(2.0 - s_a.grip.0 * 2.0, 1.0, 3.0);
|
||||
next.control_r.position =
|
||||
Vec3::new(9.0 + s_a.grip.0 * 2.0, -1.0, -2.0 + speednorm * -3.0);
|
||||
|
@ -1423,8 +1423,10 @@ impl Site {
|
||||
}
|
||||
let mut last_block = None;
|
||||
|
||||
// TODO: Don't unwrap here
|
||||
let col = canvas.col(wpos).unwrap().get_info();
|
||||
let col = canvas
|
||||
.col(wpos)
|
||||
.map(|col| col.get_info())
|
||||
.unwrap_or_default();
|
||||
|
||||
for z in aabb.min.z..aabb.max.z {
|
||||
let pos = Vec3::new(x, y, z);
|
||||
|
Loading…
Reference in New Issue
Block a user