mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
removed weapon_id attribs, replaced with matches
This commit is contained in:
@ -2,6 +2,7 @@ use super::{
|
|||||||
super::{Animation, SkeletonAttr},
|
super::{Animation, SkeletonAttr},
|
||||||
CharacterSkeleton,
|
CharacterSkeleton,
|
||||||
};
|
};
|
||||||
|
use common::comp::item::Weapon;
|
||||||
use std::{f32::consts::PI, ops::Mul};
|
use std::{f32::consts::PI, ops::Mul};
|
||||||
use vek::*;
|
use vek::*;
|
||||||
|
|
||||||
@ -60,166 +61,175 @@ impl Animation for CidleAnimation {
|
|||||||
next.shorts.ori = Quaternion::rotation_x(0.0);
|
next.shorts.ori = Quaternion::rotation_x(0.0);
|
||||||
next.shorts.scale = Vec3::one();
|
next.shorts.scale = Vec3::one();
|
||||||
|
|
||||||
if skeleton_attr.weapon_id == 1.0 {
|
match Weapon::Hammer {
|
||||||
next.l_hand.offset = Vec3::new(
|
//TODO: Inventory
|
||||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
Weapon::Sword => {
|
||||||
3.5 + wave_ultra_slow_cos * 0.5,
|
next.l_hand.offset = Vec3::new(
|
||||||
0.0 + wave_ultra_slow * 1.0,
|
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||||
);
|
3.5 + wave_ultra_slow_cos * 0.5,
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
0.0 + wave_ultra_slow * 1.0,
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
);
|
||||||
next.r_hand.offset = Vec3::new(
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
3.0 + wave_ultra_slow_cos * 0.5,
|
next.r_hand.offset = Vec3::new(
|
||||||
-2.0 + wave_ultra_slow * 1.0,
|
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||||
);
|
3.0 + wave_ultra_slow_cos * 0.5,
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
-2.0 + wave_ultra_slow * 1.0,
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
);
|
||||||
next.weapon.offset = Vec3::new(
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
-6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
|
next.weapon.offset = Vec3::new(
|
||||||
0.0 + wave_ultra_slow * 1.0,
|
-6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
|
||||||
);
|
4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
0.0 + wave_ultra_slow * 1.0,
|
||||||
* Quaternion::rotation_y(0.0)
|
);
|
||||||
* Quaternion::rotation_z(0.0);
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.weapon.scale = Vec3::one();
|
* Quaternion::rotation_y(0.0)
|
||||||
} else if skeleton_attr.weapon_id == 2.0 {
|
* Quaternion::rotation_z(0.0);
|
||||||
next.l_hand.offset = Vec3::new(
|
next.weapon.scale = Vec3::one();
|
||||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
}
|
||||||
3.5 + wave_ultra_slow_cos * 0.5,
|
Weapon::Axe => {
|
||||||
0.0 + wave_ultra_slow * 1.0,
|
next.l_hand.offset = Vec3::new(
|
||||||
);
|
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
3.5 + wave_ultra_slow_cos * 0.5,
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
0.0 + wave_ultra_slow * 1.0,
|
||||||
next.r_hand.offset = Vec3::new(
|
);
|
||||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
3.0 + wave_ultra_slow_cos * 0.5,
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
-2.0 + wave_ultra_slow * 1.0,
|
next.r_hand.offset = Vec3::new(
|
||||||
);
|
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
3.0 + wave_ultra_slow_cos * 0.5,
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
-2.0 + wave_ultra_slow * 1.0,
|
||||||
next.weapon.offset = Vec3::new(
|
);
|
||||||
-6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
0.0 + wave_ultra_slow * 1.0,
|
next.weapon.offset = Vec3::new(
|
||||||
);
|
-6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
|
||||||
* Quaternion::rotation_y(0.0)
|
0.0 + wave_ultra_slow * 1.0,
|
||||||
* Quaternion::rotation_z(0.0);
|
);
|
||||||
next.weapon.scale = Vec3::one();
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
} else if skeleton_attr.weapon_id == 3.0 {
|
* Quaternion::rotation_y(0.0)
|
||||||
next.l_hand.offset = Vec3::new(-7.0, 8.25, 2.0);
|
* Quaternion::rotation_z(0.0);
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3)
|
next.weapon.scale = Vec3::one();
|
||||||
* Quaternion::rotation_y(-1.2)
|
}
|
||||||
* Quaternion::rotation_z(wave_ultra_slow * 0.2);
|
Weapon::Hammer => {
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
next.l_hand.offset = Vec3::new(-7.0, 8.25, 2.0);
|
||||||
next.r_hand.offset = Vec3::new(7.0, 7.0, -3.0);
|
next.l_hand.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3)
|
* Quaternion::rotation_y(-1.2)
|
||||||
* Quaternion::rotation_y(-1.2)
|
* Quaternion::rotation_z(wave_ultra_slow * 0.2);
|
||||||
* Quaternion::rotation_z(wave_ultra_slow * 0.2);
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.r_hand.offset = Vec3::new(7.0, 7.0, -3.0);
|
||||||
next.weapon.offset = Vec3::new(
|
next.r_hand.ori = Quaternion::rotation_x(-0.3)
|
||||||
5.0 + skeleton_attr.weapon_x,
|
* Quaternion::rotation_y(-1.2)
|
||||||
8.75 + skeleton_attr.weapon_y,
|
* Quaternion::rotation_z(wave_ultra_slow * 0.2);
|
||||||
-2.5,
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
);
|
next.weapon.offset = Vec3::new(
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
5.0 + skeleton_attr.weapon_x,
|
||||||
* Quaternion::rotation_y(-1.2)
|
8.75 + skeleton_attr.weapon_y,
|
||||||
* Quaternion::rotation_z(wave_ultra_slow * 0.2);
|
-2.5,
|
||||||
next.weapon.scale = Vec3::one();
|
);
|
||||||
} else if skeleton_attr.weapon_id == 4.0 {
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.l_hand.offset = Vec3::new(
|
* Quaternion::rotation_y(-1.2)
|
||||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
* Quaternion::rotation_z(wave_ultra_slow * 0.2);
|
||||||
3.5 + wave_ultra_slow_cos * 0.5,
|
next.weapon.scale = Vec3::one();
|
||||||
0.0 + wave_ultra_slow * 1.0,
|
}
|
||||||
);
|
Weapon::Staff => {
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
next.l_hand.offset = Vec3::new(
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||||
next.r_hand.offset = Vec3::new(
|
3.5 + wave_ultra_slow_cos * 0.5,
|
||||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
0.0 + wave_ultra_slow * 1.0,
|
||||||
3.0 + wave_ultra_slow_cos * 0.5,
|
);
|
||||||
-2.0 + wave_ultra_slow * 1.0,
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
);
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
next.r_hand.offset = Vec3::new(
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||||
next.weapon.offset = Vec3::new(
|
3.0 + wave_ultra_slow_cos * 0.5,
|
||||||
-6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
|
-2.0 + wave_ultra_slow * 1.0,
|
||||||
4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
|
);
|
||||||
0.0 + wave_ultra_slow * 1.0,
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
);
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.weapon.offset = Vec3::new(
|
||||||
* Quaternion::rotation_y(0.0)
|
-6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
|
||||||
* Quaternion::rotation_z(0.0);
|
4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
|
||||||
next.weapon.scale = Vec3::one();
|
0.0 + wave_ultra_slow * 1.0,
|
||||||
} else if skeleton_attr.weapon_id == 5.0 {
|
);
|
||||||
next.l_hand.offset = Vec3::new(
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
* Quaternion::rotation_y(0.0)
|
||||||
3.5 + wave_ultra_slow_cos * 0.5,
|
* Quaternion::rotation_z(0.0);
|
||||||
0.0 + wave_ultra_slow * 1.0,
|
next.weapon.scale = Vec3::one();
|
||||||
);
|
}
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
Weapon::SwordShield => {
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
next.l_hand.offset = Vec3::new(
|
||||||
next.r_hand.offset = Vec3::new(
|
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
3.5 + wave_ultra_slow_cos * 0.5,
|
||||||
3.0 + wave_ultra_slow_cos * 0.5,
|
0.0 + wave_ultra_slow * 1.0,
|
||||||
-2.0 + wave_ultra_slow * 1.0,
|
);
|
||||||
);
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.r_hand.offset = Vec3::new(
|
||||||
next.weapon.offset = Vec3::new(
|
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||||
-6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
|
3.0 + wave_ultra_slow_cos * 0.5,
|
||||||
4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
|
-2.0 + wave_ultra_slow * 1.0,
|
||||||
0.0 + wave_ultra_slow * 1.0,
|
);
|
||||||
);
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
* Quaternion::rotation_y(0.0)
|
next.weapon.offset = Vec3::new(
|
||||||
* Quaternion::rotation_z(0.0);
|
-6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
|
||||||
next.weapon.scale = Vec3::one();
|
4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
|
||||||
} else if skeleton_attr.weapon_id == 6.0 {
|
0.0 + wave_ultra_slow * 1.0,
|
||||||
next.l_hand.offset = Vec3::new(
|
);
|
||||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
3.5 + wave_ultra_slow_cos * 0.5,
|
* Quaternion::rotation_y(0.0)
|
||||||
0.0 + wave_ultra_slow * 1.0,
|
* Quaternion::rotation_z(0.0);
|
||||||
);
|
next.weapon.scale = Vec3::one();
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
}
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
Weapon::Bow => {
|
||||||
next.r_hand.offset = Vec3::new(
|
next.l_hand.offset = Vec3::new(
|
||||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||||
3.0 + wave_ultra_slow_cos * 0.5,
|
3.5 + wave_ultra_slow_cos * 0.5,
|
||||||
-2.0 + wave_ultra_slow * 1.0,
|
0.0 + wave_ultra_slow * 1.0,
|
||||||
);
|
);
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.offset = Vec3::new(
|
next.r_hand.offset = Vec3::new(
|
||||||
-6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
|
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||||
4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
|
3.0 + wave_ultra_slow_cos * 0.5,
|
||||||
0.0 + wave_ultra_slow * 1.0,
|
-2.0 + wave_ultra_slow * 1.0,
|
||||||
);
|
);
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
* Quaternion::rotation_y(0.0)
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
* Quaternion::rotation_z(0.0);
|
next.weapon.offset = Vec3::new(
|
||||||
next.weapon.scale = Vec3::one();
|
-6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
|
||||||
} else if skeleton_attr.weapon_id == 7.0 {
|
4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
|
||||||
next.l_hand.offset = Vec3::new(
|
0.0 + wave_ultra_slow * 1.0,
|
||||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
);
|
||||||
3.5 + wave_ultra_slow_cos * 0.5,
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
0.0 + wave_ultra_slow * 1.0,
|
* Quaternion::rotation_y(0.0)
|
||||||
);
|
* Quaternion::rotation_z(0.0);
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
next.weapon.scale = Vec3::one();
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
}
|
||||||
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
Weapon::Daggers => {
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
next.l_hand.offset = Vec3::new(
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||||
next.weapon.offset = Vec3::new(
|
3.5 + wave_ultra_slow_cos * 0.5,
|
||||||
-6.0 + skeleton_attr.weapon_x,
|
0.0 + wave_ultra_slow * 1.0,
|
||||||
4.5 + skeleton_attr.weapon_y,
|
);
|
||||||
0.0,
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
);
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
||||||
* Quaternion::rotation_y(0.0)
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
* Quaternion::rotation_z(0.0);
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.scale = Vec3::one();
|
next.weapon.offset = Vec3::new(
|
||||||
|
-6.0 + skeleton_attr.weapon_x,
|
||||||
|
4.5 + skeleton_attr.weapon_y,
|
||||||
|
0.0,
|
||||||
|
);
|
||||||
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
|
* Quaternion::rotation_y(0.0)
|
||||||
|
* Quaternion::rotation_z(0.0);
|
||||||
|
next.weapon.scale = Vec3::one();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
next.l_foot.offset = Vec3::new(-3.4, -1.5, 8.0 + wave_slow * 0.2);
|
next.l_foot.offset = Vec3::new(-3.4, -1.5, 8.0 + wave_slow * 0.2);
|
||||||
next.l_foot.ori = Quaternion::rotation_x(wave_ultra_slow_cos * 0.015);
|
next.l_foot.ori = Quaternion::rotation_x(wave_ultra_slow_cos * 0.015);
|
||||||
|
@ -2,6 +2,7 @@ use super::{
|
|||||||
super::{Animation, SkeletonAttr},
|
super::{Animation, SkeletonAttr},
|
||||||
CharacterSkeleton,
|
CharacterSkeleton,
|
||||||
};
|
};
|
||||||
|
use common::comp::item::Weapon;
|
||||||
use std::f32::consts::PI;
|
use std::f32::consts::PI;
|
||||||
use vek::*;
|
use vek::*;
|
||||||
|
|
||||||
@ -42,126 +43,135 @@ impl Animation for CjumpAnimation {
|
|||||||
next.shorts.ori = Quaternion::rotation_z(0.0);
|
next.shorts.ori = Quaternion::rotation_z(0.0);
|
||||||
next.shorts.scale = Vec3::one();
|
next.shorts.scale = Vec3::one();
|
||||||
|
|
||||||
if skeleton_attr.weapon_id == 1.0 {
|
match Weapon::Hammer {
|
||||||
next.l_hand.offset = Vec3::new(-7.0, 3.25, 0.25 + wave_stop * 2.0);
|
//TODO: Inventory
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
Weapon::Sword => {
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
next.l_hand.offset = Vec3::new(-7.0, 3.25, 0.25 + wave_stop * 2.0);
|
||||||
next.r_hand.offset = Vec3::new(-7.0, 3.0, -2.0 + wave_stop * 2.0);
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.r_hand.offset = Vec3::new(-7.0, 3.0, -2.0 + wave_stop * 2.0);
|
||||||
next.weapon.offset = Vec3::new(
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
-7.0 + skeleton_attr.weapon_x,
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
4.0 + skeleton_attr.weapon_y,
|
next.weapon.offset = Vec3::new(
|
||||||
0.0 + wave_stop * 2.0,
|
-7.0 + skeleton_attr.weapon_x,
|
||||||
);
|
4.0 + skeleton_attr.weapon_y,
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
0.0 + wave_stop * 2.0,
|
||||||
* Quaternion::rotation_y(0.0)
|
);
|
||||||
* Quaternion::rotation_z(0.0);
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.weapon.scale = Vec3::one();
|
* Quaternion::rotation_y(0.0)
|
||||||
} else if skeleton_attr.weapon_id == 2.0 {
|
* Quaternion::rotation_z(0.0);
|
||||||
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
next.weapon.scale = Vec3::one();
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
}
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
Weapon::Axe => {
|
||||||
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.offset = Vec3::new(
|
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
||||||
-6.0 + skeleton_attr.weapon_x,
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
4.5 + skeleton_attr.weapon_y,
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
0.0,
|
next.weapon.offset = Vec3::new(
|
||||||
);
|
-6.0 + skeleton_attr.weapon_x,
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
4.5 + skeleton_attr.weapon_y,
|
||||||
* Quaternion::rotation_y(0.0)
|
0.0,
|
||||||
* Quaternion::rotation_z(0.0);
|
);
|
||||||
next.weapon.scale = Vec3::one();
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
} else if skeleton_attr.weapon_id == 3.0 {
|
* Quaternion::rotation_y(0.0)
|
||||||
next.l_hand.offset = Vec3::new(-7.0, 8.25, 2.0 + wave_stop * 2.0);
|
* Quaternion::rotation_z(0.0);
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3)
|
next.weapon.scale = Vec3::one();
|
||||||
* Quaternion::rotation_y(-1.2)
|
}
|
||||||
* Quaternion::rotation_z(0.0);
|
Weapon::Hammer => {
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
next.l_hand.offset = Vec3::new(-7.0, 8.25, 2.0 + wave_stop * 2.0);
|
||||||
next.r_hand.offset = Vec3::new(7.0, 7.0, -3.0 + wave_stop * 2.0);
|
next.l_hand.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3)
|
* Quaternion::rotation_y(-1.2)
|
||||||
* Quaternion::rotation_y(-1.2)
|
* Quaternion::rotation_z(0.0);
|
||||||
* Quaternion::rotation_z(0.0);
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.r_hand.offset = Vec3::new(7.0, 7.0, -3.0 + wave_stop * 2.0);
|
||||||
next.weapon.offset = Vec3::new(
|
next.r_hand.ori = Quaternion::rotation_x(-0.3)
|
||||||
5.0 + skeleton_attr.weapon_x,
|
* Quaternion::rotation_y(-1.2)
|
||||||
8.75 + skeleton_attr.weapon_y,
|
* Quaternion::rotation_z(0.0);
|
||||||
-2.5 + wave_stop * 2.0,
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
);
|
next.weapon.offset = Vec3::new(
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
5.0 + skeleton_attr.weapon_x,
|
||||||
* Quaternion::rotation_y(-1.2)
|
8.75 + skeleton_attr.weapon_y,
|
||||||
* Quaternion::rotation_z(0.0);
|
-2.5 + wave_stop * 2.0,
|
||||||
next.weapon.scale = Vec3::one();
|
);
|
||||||
} else if skeleton_attr.weapon_id == 4.0 {
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.l_hand.offset = Vec3::new(-7.0, 7.5, 0.0);
|
* Quaternion::rotation_y(-1.2)
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3)
|
* Quaternion::rotation_z(0.0);
|
||||||
* Quaternion::rotation_y(-1.7)
|
next.weapon.scale = Vec3::one();
|
||||||
* Quaternion::rotation_z(1.0);
|
}
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
Weapon::Staff => {
|
||||||
next.r_hand.offset = Vec3::new(7.0, 6.25, 1.5);
|
next.l_hand.offset = Vec3::new(-7.0, 7.5, 0.0);
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3)
|
next.l_hand.ori = Quaternion::rotation_x(-0.3)
|
||||||
* Quaternion::rotation_y(-1.7)
|
* Quaternion::rotation_y(-1.7)
|
||||||
* Quaternion::rotation_z(1.0);
|
* Quaternion::rotation_z(1.0);
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.offset = Vec3::new(
|
next.r_hand.offset = Vec3::new(7.0, 6.25, 1.5);
|
||||||
5.0 + skeleton_attr.weapon_x,
|
next.r_hand.ori = Quaternion::rotation_x(-0.3)
|
||||||
8.0 + skeleton_attr.weapon_y,
|
* Quaternion::rotation_y(-1.7)
|
||||||
1.0,
|
* Quaternion::rotation_z(1.0);
|
||||||
);
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.weapon.offset = Vec3::new(
|
||||||
* Quaternion::rotation_y(-1.7)
|
5.0 + skeleton_attr.weapon_x,
|
||||||
* Quaternion::rotation_z(1.0);
|
8.0 + skeleton_attr.weapon_y,
|
||||||
next.weapon.scale = Vec3::one();
|
1.0,
|
||||||
} else if skeleton_attr.weapon_id == 5.0 {
|
);
|
||||||
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
* Quaternion::rotation_y(-1.7)
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
* Quaternion::rotation_z(1.0);
|
||||||
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
next.weapon.scale = Vec3::one();
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
}
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
Weapon::SwordShield => {
|
||||||
next.weapon.offset = Vec3::new(
|
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
||||||
-6.0 + skeleton_attr.weapon_x,
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
4.5 + skeleton_attr.weapon_y,
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
0.0,
|
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
||||||
);
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
* Quaternion::rotation_y(0.0)
|
next.weapon.offset = Vec3::new(
|
||||||
* Quaternion::rotation_z(0.0);
|
-6.0 + skeleton_attr.weapon_x,
|
||||||
next.weapon.scale = Vec3::one();
|
4.5 + skeleton_attr.weapon_y,
|
||||||
} else if skeleton_attr.weapon_id == 6.0 {
|
0.0,
|
||||||
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
);
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
* Quaternion::rotation_y(0.0)
|
||||||
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
* Quaternion::rotation_z(0.0);
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
next.weapon.scale = Vec3::one();
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
}
|
||||||
next.weapon.offset = Vec3::new(
|
Weapon::Bow => {
|
||||||
-6.0 + skeleton_attr.weapon_x,
|
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
||||||
4.5 + skeleton_attr.weapon_y,
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
0.0,
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
);
|
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
* Quaternion::rotation_y(0.0)
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
* Quaternion::rotation_z(0.0);
|
next.weapon.offset = Vec3::new(
|
||||||
next.weapon.scale = Vec3::one();
|
-6.0 + skeleton_attr.weapon_x,
|
||||||
} else if skeleton_attr.weapon_id == 7.0 {
|
4.5 + skeleton_attr.weapon_y,
|
||||||
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
0.0,
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
);
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
* Quaternion::rotation_y(0.0)
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
* Quaternion::rotation_z(0.0);
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.weapon.scale = Vec3::one();
|
||||||
next.weapon.offset = Vec3::new(
|
}
|
||||||
-6.0 + skeleton_attr.weapon_x,
|
Weapon::Daggers => {
|
||||||
4.5 + skeleton_attr.weapon_y,
|
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
||||||
0.0,
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
);
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
||||||
* Quaternion::rotation_y(0.0)
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
* Quaternion::rotation_z(0.0);
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.scale = Vec3::one();
|
next.weapon.offset = Vec3::new(
|
||||||
|
-6.0 + skeleton_attr.weapon_x,
|
||||||
|
4.5 + skeleton_attr.weapon_y,
|
||||||
|
0.0,
|
||||||
|
);
|
||||||
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
|
* Quaternion::rotation_y(0.0)
|
||||||
|
* Quaternion::rotation_z(0.0);
|
||||||
|
next.weapon.scale = Vec3::one();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
next.l_foot.offset = Vec3::new(-3.4, 1.0, 6.0);
|
next.l_foot.offset = Vec3::new(-3.4, 1.0, 6.0);
|
||||||
|
@ -2,6 +2,7 @@ use super::{
|
|||||||
super::{Animation, SkeletonAttr},
|
super::{Animation, SkeletonAttr},
|
||||||
CharacterSkeleton,
|
CharacterSkeleton,
|
||||||
};
|
};
|
||||||
|
use common::comp::item::Weapon;
|
||||||
use std::f32::consts::PI;
|
use std::f32::consts::PI;
|
||||||
use std::ops::Mul;
|
use std::ops::Mul;
|
||||||
use vek::*;
|
use vek::*;
|
||||||
@ -60,122 +61,131 @@ impl Animation for CrunAnimation {
|
|||||||
next.shorts.ori = Quaternion::rotation_z(wave * 0.6);
|
next.shorts.ori = Quaternion::rotation_z(wave * 0.6);
|
||||||
next.shorts.scale = Vec3::one();
|
next.shorts.scale = Vec3::one();
|
||||||
|
|
||||||
if skeleton_attr.weapon_id == 1.0 {
|
match Weapon::Hammer {
|
||||||
next.l_hand.offset = Vec3::new(-6.0, 3.75, 0.25);
|
//TODO: Inventory
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
Weapon::Sword => {
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
next.l_hand.offset = Vec3::new(-6.0, 3.75, 0.25);
|
||||||
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
||||||
next.weapon.offset = Vec3::new(
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
-6.0 + skeleton_attr.weapon_x,
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
4.0 + skeleton_attr.weapon_y,
|
next.weapon.offset = Vec3::new(
|
||||||
0.0,
|
-6.0 + skeleton_attr.weapon_x,
|
||||||
);
|
4.0 + skeleton_attr.weapon_y,
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
0.0,
|
||||||
* Quaternion::rotation_y(0.0)
|
);
|
||||||
* Quaternion::rotation_z(0.0);
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.weapon.scale = Vec3::one();
|
* Quaternion::rotation_y(0.0)
|
||||||
} else if skeleton_attr.weapon_id == 2.0 {
|
* Quaternion::rotation_z(0.0);
|
||||||
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
next.weapon.scale = Vec3::one();
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
}
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
Weapon::Axe => {
|
||||||
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.offset = Vec3::new(
|
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
||||||
-6.0 + skeleton_attr.weapon_x,
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
4.5 + skeleton_attr.weapon_y,
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
0.0,
|
next.weapon.offset = Vec3::new(
|
||||||
);
|
-6.0 + skeleton_attr.weapon_x,
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
4.5 + skeleton_attr.weapon_y,
|
||||||
* Quaternion::rotation_y(0.0)
|
0.0,
|
||||||
* Quaternion::rotation_z(0.0);
|
);
|
||||||
next.weapon.scale = Vec3::one();
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
} else if skeleton_attr.weapon_id == 3.0 {
|
* Quaternion::rotation_y(0.0)
|
||||||
next.l_hand.offset = Vec3::new(-7.0, 8.25, 3.0);
|
* Quaternion::rotation_z(0.0);
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3)
|
next.weapon.scale = Vec3::one();
|
||||||
* Quaternion::rotation_y(-1.2)
|
}
|
||||||
* Quaternion::rotation_z(wave * -0.25);
|
Weapon::Hammer => {
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
next.l_hand.offset = Vec3::new(-7.0, 8.25, 3.0);
|
||||||
next.r_hand.offset = Vec3::new(7.0, 7.0, -1.5);
|
next.l_hand.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3)
|
* Quaternion::rotation_y(-1.2)
|
||||||
* Quaternion::rotation_y(-1.2)
|
* Quaternion::rotation_z(wave * -0.25);
|
||||||
* Quaternion::rotation_z(wave * -0.25);
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.r_hand.offset = Vec3::new(7.0, 7.0, -1.5);
|
||||||
next.weapon.offset = Vec3::new(
|
next.r_hand.ori = Quaternion::rotation_x(-0.3)
|
||||||
5.0 + skeleton_attr.weapon_x,
|
* Quaternion::rotation_y(-1.2)
|
||||||
8.75 + skeleton_attr.weapon_y,
|
* Quaternion::rotation_z(wave * -0.25);
|
||||||
-2.0,
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
);
|
next.weapon.offset = Vec3::new(
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
5.0 + skeleton_attr.weapon_x,
|
||||||
* Quaternion::rotation_y(-1.2)
|
8.75 + skeleton_attr.weapon_y,
|
||||||
* Quaternion::rotation_z(wave * -0.25);
|
-2.0,
|
||||||
next.weapon.scale = Vec3::one();
|
);
|
||||||
} else if skeleton_attr.weapon_id == 4.0 {
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
* Quaternion::rotation_y(-1.2)
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
* Quaternion::rotation_z(wave * -0.25);
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
next.weapon.scale = Vec3::one();
|
||||||
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
}
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
Weapon::Staff => {
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
||||||
next.weapon.offset = Vec3::new(
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
-6.0 + skeleton_attr.weapon_x,
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
4.5 + skeleton_attr.weapon_y,
|
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
||||||
0.0,
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
);
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.weapon.offset = Vec3::new(
|
||||||
* Quaternion::rotation_y(0.0)
|
-6.0 + skeleton_attr.weapon_x,
|
||||||
* Quaternion::rotation_z(0.0);
|
4.5 + skeleton_attr.weapon_y,
|
||||||
next.weapon.scale = Vec3::one();
|
0.0,
|
||||||
} else if skeleton_attr.weapon_id == 5.0 {
|
);
|
||||||
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
* Quaternion::rotation_y(0.0)
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
* Quaternion::rotation_z(0.0);
|
||||||
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
next.weapon.scale = Vec3::one();
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
}
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
Weapon::SwordShield => {
|
||||||
next.weapon.offset = Vec3::new(
|
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
||||||
-6.0 + skeleton_attr.weapon_x,
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
4.5 + skeleton_attr.weapon_y,
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
0.0,
|
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
||||||
);
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
* Quaternion::rotation_y(0.0)
|
next.weapon.offset = Vec3::new(
|
||||||
* Quaternion::rotation_z(0.0);
|
-6.0 + skeleton_attr.weapon_x,
|
||||||
next.weapon.scale = Vec3::one();
|
4.5 + skeleton_attr.weapon_y,
|
||||||
} else if skeleton_attr.weapon_id == 6.0 {
|
0.0,
|
||||||
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
);
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
* Quaternion::rotation_y(0.0)
|
||||||
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
* Quaternion::rotation_z(0.0);
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
next.weapon.scale = Vec3::one();
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
}
|
||||||
next.weapon.offset = Vec3::new(
|
Weapon::Bow => {
|
||||||
-6.0 + skeleton_attr.weapon_x,
|
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
||||||
4.5 + skeleton_attr.weapon_y,
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
0.0,
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
);
|
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
* Quaternion::rotation_y(0.0)
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
* Quaternion::rotation_z(0.0);
|
next.weapon.offset = Vec3::new(
|
||||||
next.weapon.scale = Vec3::one();
|
-6.0 + skeleton_attr.weapon_x,
|
||||||
} else if skeleton_attr.weapon_id == 7.0 {
|
4.5 + skeleton_attr.weapon_y,
|
||||||
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
0.0,
|
||||||
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
);
|
||||||
next.l_hand.scale = Vec3::one() * 1.01;
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
* Quaternion::rotation_y(0.0)
|
||||||
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
* Quaternion::rotation_z(0.0);
|
||||||
next.r_hand.scale = Vec3::one() * 1.01;
|
next.weapon.scale = Vec3::one();
|
||||||
next.weapon.offset = Vec3::new(
|
}
|
||||||
-6.0 + skeleton_attr.weapon_x,
|
Weapon::Daggers => {
|
||||||
4.5 + skeleton_attr.weapon_y,
|
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
|
||||||
0.0,
|
next.l_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
);
|
next.l_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
|
||||||
* Quaternion::rotation_y(0.0)
|
next.r_hand.ori = Quaternion::rotation_x(-0.3);
|
||||||
* Quaternion::rotation_z(0.0);
|
next.r_hand.scale = Vec3::one() * 1.01;
|
||||||
next.weapon.scale = Vec3::one();
|
next.weapon.offset = Vec3::new(
|
||||||
|
-6.0 + skeleton_attr.weapon_x,
|
||||||
|
4.5 + skeleton_attr.weapon_y,
|
||||||
|
0.0,
|
||||||
|
);
|
||||||
|
next.weapon.ori = Quaternion::rotation_x(-0.3)
|
||||||
|
* Quaternion::rotation_y(0.0)
|
||||||
|
* Quaternion::rotation_z(0.0);
|
||||||
|
next.weapon.scale = Vec3::one();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
next.l_foot.offset = Vec3::new(-3.4, 0.0 + wave_cos * 1.0, 6.0 - wave_cos_dub * 0.11);
|
next.l_foot.offset = Vec3::new(-3.4, 0.0 + wave_cos * 1.0, 6.0 - wave_cos_dub * 0.11);
|
||||||
next.l_foot.ori = Quaternion::rotation_x(-0.0 - wave_cos * 1.5);
|
next.l_foot.ori = Quaternion::rotation_x(-0.0 - wave_cos * 1.5);
|
||||||
|
@ -54,7 +54,6 @@ pub struct SkeletonAttr {
|
|||||||
neck_right: f32,
|
neck_right: f32,
|
||||||
weapon_x: f32,
|
weapon_x: f32,
|
||||||
weapon_y: f32,
|
weapon_y: f32,
|
||||||
weapon_id: f32,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for SkeletonAttr {
|
impl Default for SkeletonAttr {
|
||||||
@ -67,7 +66,6 @@ impl Default for SkeletonAttr {
|
|||||||
neck_right: 1.0,
|
neck_right: 1.0,
|
||||||
weapon_x: 1.0,
|
weapon_x: 1.0,
|
||||||
weapon_y: 1.0,
|
weapon_y: 1.0,
|
||||||
weapon_id: 0.0,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -166,16 +164,6 @@ impl<'a> From<&'a comp::humanoid::Body> for SkeletonAttr {
|
|||||||
Weapon::Bow => -2.0,
|
Weapon::Bow => -2.0,
|
||||||
Weapon::Daggers => -2.0,
|
Weapon::Daggers => -2.0,
|
||||||
},
|
},
|
||||||
weapon_id: match Weapon::Hammer {
|
|
||||||
// TODO: Inventory
|
|
||||||
Weapon::Sword => 1.0,
|
|
||||||
Weapon::Axe => 2.0,
|
|
||||||
Weapon::Hammer => 3.0,
|
|
||||||
Weapon::SwordShield => 4.0,
|
|
||||||
Weapon::Staff => 5.0,
|
|
||||||
Weapon::Bow => 6.0,
|
|
||||||
Weapon::Daggers => 7.0,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user