Merge branch 'ubruntu/dagger-ux' into 'master'

Dagger UX

See merge request veloren/veloren!3072
This commit is contained in:
Samuel Keiffer 2021-12-28 22:09:34 +00:00
commit 4d85ae4f60
15 changed files with 63 additions and 29 deletions

View File

@ -5,7 +5,7 @@ ItemDef(
kind: Dagger, kind: Dagger,
hands: One, hands: One,
stats: Direct(( stats: Direct((
equip_time_secs: 0.0, equip_time_secs: 0.2,
power: 1.8, power: 1.8,
effect_power: 2.0, effect_power: 2.0,
speed: 1.0, speed: 1.0,

View File

@ -5,7 +5,7 @@ ItemDef(
kind: Dagger, kind: Dagger,
hands: One, hands: One,
stats: Direct(( stats: Direct((
equip_time_secs: 0.0, equip_time_secs: 0.2,
power: 2.0, power: 2.0,
effect_power: 1.0, effect_power: 1.0,
speed: 1.0, speed: 1.0,

View File

@ -5,7 +5,7 @@ ItemDef(
kind: Dagger, kind: Dagger,
hands: One, hands: One,
stats: Direct(( stats: Direct((
equip_time_secs: 0.3, equip_time_secs: 0.2,
power: 1.0, power: 1.0,
effect_power: 0.5, effect_power: 0.5,
speed: 1.0, speed: 1.0,

View File

@ -62,6 +62,7 @@ Is the client up to date?"#,
"common.species.danari": "Danari", "common.species.danari": "Danari",
"common.weapons.axe": "Axe", "common.weapons.axe": "Axe",
"common.weapons.dagger": "Dagger",
"common.weapons.greatsword": "Greatsword", "common.weapons.greatsword": "Greatsword",
"common.weapons.shortswords": "Shortswords", "common.weapons.shortswords": "Shortswords",
"common.weapons.sword": "Sword", "common.weapons.sword": "Sword",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -48,7 +48,7 @@ impl Animation for AlphaAnimation {
next.torso.orientation = Quaternion::rotation_z(0.0); next.torso.orientation = Quaternion::rotation_z(0.0);
match ability_info.and_then(|a| a.tool) { match ability_info.and_then(|a| a.tool) {
Some(ToolKind::Sword) => { Some(ToolKind::Sword | ToolKind::Dagger) => {
next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_x(0.0); next.main.orientation = Quaternion::rotation_x(0.0);
@ -192,7 +192,7 @@ impl Animation for AlphaAnimation {
match hands { match hands {
(Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) { (Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) {
Some(ToolKind::Sword) => { Some(ToolKind::Sword | ToolKind::Dagger) => {
next.control_l.position = Vec3::new(-7.0, 8.0, 2.0); next.control_l.position = Vec3::new(-7.0, 8.0, 2.0);
next.control_l.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) next.control_l.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0)
* Quaternion::rotation_y(move1 * -1.2 + move2 * -1.5) * Quaternion::rotation_y(move1 * -1.2 + move2 * -1.5)
@ -233,7 +233,7 @@ impl Animation for AlphaAnimation {
match hands { match hands {
(None | Some(Hands::One), Some(Hands::One)) => { (None | Some(Hands::One), Some(Hands::One)) => {
match ability_info.and_then(|a| a.tool) { match ability_info.and_then(|a| a.tool) {
Some(ToolKind::Sword) => { Some(ToolKind::Sword | ToolKind::Dagger) => {
next.control_r.position = Vec3::new(7.0 + move2 * 8.0, 8.0, 2.0); next.control_r.position = Vec3::new(7.0 + move2 * 8.0, 8.0, 2.0);
next.control_r.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) next.control_r.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0)
* Quaternion::rotation_y(move1 * -1.8 + move2 * -1.5) * Quaternion::rotation_y(move1 * -1.8 + move2 * -1.5)

View File

@ -110,6 +110,11 @@ impl Animation for IdleAnimation {
match hands { match hands {
(Some(Hands::One), _) => match active_tool_kind { (Some(Hands::One), _) => match active_tool_kind {
Some(ToolKind::Dagger) => {
next.main.position = Vec3::new(5.0, 1.0, 2.0);
next.main.orientation =
Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(2.0 * PI);
},
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => { Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
next.main.position = Vec3::new(-4.0, -5.0, 10.0); next.main.position = Vec3::new(-4.0, -5.0, 10.0);
next.main.orientation = next.main.orientation =
@ -122,6 +127,11 @@ impl Animation for IdleAnimation {
}; };
match hands { match hands {
(None | Some(Hands::One), Some(Hands::One)) => match second_tool_kind { (None | Some(Hands::One), Some(Hands::One)) => match second_tool_kind {
Some(ToolKind::Dagger) => {
next.second.position = Vec3::new(-5.0, 1.0, 2.0);
next.second.orientation =
Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(-2.0 * PI);
},
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => { Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
next.second.position = Vec3::new(4.0, -6.0, 10.0); next.second.position = Vec3::new(4.0, -6.0, 10.0);
next.second.orientation = next.second.orientation =

View File

@ -144,9 +144,9 @@ impl Animation for JumpAnimation {
match main_tool { match main_tool {
Some(ToolKind::Dagger) => { Some(ToolKind::Dagger) => {
next.main.position = Vec3::new(-4.0, -5.0, 7.0); next.main.position = Vec3::new(5.0, 1.0, 2.0);
next.main.orientation = next.main.orientation =
Quaternion::rotation_y(0.25 * PI) * Quaternion::rotation_z(1.5 * PI); Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(2.0 * PI);
}, },
Some(ToolKind::Shield) => { Some(ToolKind::Shield) => {
next.main.position = Vec3::new(-0.0, -5.0, 3.0); next.main.position = Vec3::new(-0.0, -5.0, 3.0);
@ -172,9 +172,9 @@ impl Animation for JumpAnimation {
match second_tool_kind { match second_tool_kind {
Some(ToolKind::Dagger) => { Some(ToolKind::Dagger) => {
next.second.position = Vec3::new(4.0, -6.0, 7.0); next.second.position = Vec3::new(-5.0, 1.0, 2.0);
next.second.orientation = next.second.orientation =
Quaternion::rotation_y(-0.25 * PI) * Quaternion::rotation_z(-1.5 * PI); Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(-2.0 * PI);
}, },
Some(ToolKind::Shield) => { Some(ToolKind::Shield) => {
next.second.position = Vec3::new(0.0, -4.0, 3.0); next.second.position = Vec3::new(0.0, -4.0, 3.0);

View File

@ -208,9 +208,9 @@ impl Animation for RunAnimation {
match main_tool { match main_tool {
Some(ToolKind::Dagger) => { Some(ToolKind::Dagger) => {
next.main.position = Vec3::new(-4.0, -5.0, 7.0); next.main.position = Vec3::new(5.0, 1.0, 2.0);
next.main.orientation = next.main.orientation =
Quaternion::rotation_y(0.25 * PI) * Quaternion::rotation_z(1.5 * PI); Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(2.0 * PI);
}, },
Some(ToolKind::Shield) => { Some(ToolKind::Shield) => {
next.main.position = Vec3::new(-0.0, -5.0, 3.0); next.main.position = Vec3::new(-0.0, -5.0, 3.0);
@ -236,9 +236,9 @@ impl Animation for RunAnimation {
match second_tool_kind { match second_tool_kind {
Some(ToolKind::Dagger) => { Some(ToolKind::Dagger) => {
next.second.position = Vec3::new(4.0, -6.0, 7.0); next.second.position = Vec3::new(-5.0, 1.0, 2.0);
next.second.orientation = next.second.orientation =
Quaternion::rotation_y(-0.25 * PI) * Quaternion::rotation_z(-1.5 * PI); Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(-2.0 * PI);
}, },
Some(ToolKind::Shield) => { Some(ToolKind::Shield) => {
next.second.position = Vec3::new(0.0, -4.0, 3.0); next.second.position = Vec3::new(0.0, -4.0, 3.0);

View File

@ -314,7 +314,8 @@ impl Animation for SneakWieldAnimation {
match hands { match hands {
(Some(Hands::One), _) => { (Some(Hands::One), _) => {
next.control_l.position = Vec3::new(-7.0, 6.0, 5.0); next.control_l.position = Vec3::new(-7.0, 6.0, 5.0);
next.control_l.orientation = Quaternion::rotation_x(-0.3); next.control_l.orientation =
Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(0.2);
next.hand_l.position = Vec3::new(-1.0, -0.5, 0.0); next.hand_l.position = Vec3::new(-1.0, -0.5, 0.0);
next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0) next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0)
}, },
@ -323,7 +324,8 @@ impl Animation for SneakWieldAnimation {
match hands { match hands {
(None | Some(Hands::One), Some(Hands::One)) => { (None | Some(Hands::One), Some(Hands::One)) => {
next.control_r.position = Vec3::new(7.0, 6.0, 5.0); next.control_r.position = Vec3::new(7.0, 6.0, 5.0);
next.control_r.orientation = Quaternion::rotation_x(-0.3); next.control_r.orientation =
Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-0.2);
next.hand_r.position = Vec3::new(1.0, -0.5, 0.0); next.hand_r.position = Vec3::new(1.0, -0.5, 0.0);
next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0) next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0)
}, },

View File

@ -132,23 +132,42 @@ impl Animation for StandAnimation {
match hands { match hands {
(Some(Hands::One), _) => match active_tool_kind { (Some(Hands::One), _) => match active_tool_kind {
Some(ToolKind::Dagger) => {
next.main.position = Vec3::new(5.0, 1.0, 2.0);
next.main.orientation =
Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(2.0 * PI);
},
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => { Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
next.main.position = Vec3::new(-4.0, -5.0, 10.0); next.main.position = Vec3::new(-4.0, -5.0, 10.0);
next.main.orientation = next.main.orientation =
Quaternion::rotation_y(2.5) * Quaternion::rotation_z(PI / 2.0); Quaternion::rotation_y(2.5) * Quaternion::rotation_z(PI / 2.0);
}, },
Some(ToolKind::Shield) => {
next.main.position = Vec3::new(-0.0, -4.0, 3.0);
next.main.orientation =
Quaternion::rotation_y(0.25 * PI) * Quaternion::rotation_z(-1.5 * PI);
},
_ => {}, _ => {},
}, },
(_, _) => {}, (_, _) => {},
}; };
match hands { match hands {
(None | Some(Hands::One), Some(Hands::One)) => match second_tool_kind { (None | Some(Hands::One), Some(Hands::One)) => match second_tool_kind {
Some(ToolKind::Dagger) => {
next.second.position = Vec3::new(-5.0, 1.0, 2.0);
next.second.orientation =
Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(-2.0 * PI);
},
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => { Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
next.second.position = Vec3::new(4.0, -6.0, 10.0); next.second.position = Vec3::new(4.0, -6.0, 10.0);
next.second.orientation = next.second.orientation =
Quaternion::rotation_y(-2.5) * Quaternion::rotation_z(-PI / 2.0); Quaternion::rotation_y(-2.5) * Quaternion::rotation_z(-PI / 2.0);
}, },
Some(ToolKind::Shield) => {
next.second.position = Vec3::new(0.0, -4.0, 3.0);
next.second.orientation =
Quaternion::rotation_y(-0.25 * PI) * Quaternion::rotation_z(1.5 * PI);
},
_ => {}, _ => {},
}, },
(_, _) => {}, (_, _) => {},

View File

@ -179,9 +179,9 @@ impl Animation for SwimAnimation {
match main_tool { match main_tool {
Some(ToolKind::Dagger) => { Some(ToolKind::Dagger) => {
next.main.position = Vec3::new(-4.0, -5.0, 7.0); next.main.position = Vec3::new(5.0, 1.0, 2.0);
next.main.orientation = next.main.orientation =
Quaternion::rotation_y(0.25 * PI) * Quaternion::rotation_z(1.5 * PI); Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(2.0 * PI);
}, },
Some(ToolKind::Shield) => { Some(ToolKind::Shield) => {
next.main.position = Vec3::new(-0.0, -5.0, 3.0); next.main.position = Vec3::new(-0.0, -5.0, 3.0);
@ -207,9 +207,9 @@ impl Animation for SwimAnimation {
match second_tool_kind { match second_tool_kind {
Some(ToolKind::Dagger) => { Some(ToolKind::Dagger) => {
next.second.position = Vec3::new(4.0, -6.0, 7.0); next.second.position = Vec3::new(-5.0, 1.0, 2.0);
next.second.orientation = next.second.orientation =
Quaternion::rotation_y(-0.25 * PI) * Quaternion::rotation_z(-1.5 * PI); Quaternion::rotation_x(-1.35 * PI) * Quaternion::rotation_z(-2.0 * PI);
}, },
Some(ToolKind::Shield) => { Some(ToolKind::Shield) => {
next.second.position = Vec3::new(0.0, -4.0, 3.0); next.second.position = Vec3::new(0.0, -4.0, 3.0);

View File

@ -291,7 +291,8 @@ impl Animation for WieldAnimation {
match hands { match hands {
(Some(Hands::One), _) => { (Some(Hands::One), _) => {
next.control_l.position = Vec3::new(-7.0, 8.0, 2.0); next.control_l.position = Vec3::new(-7.0, 8.0, 2.0);
next.control_l.orientation = Quaternion::rotation_x(-0.3); next.control_l.orientation =
Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(0.2);
next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); next.hand_l.position = Vec3::new(0.0, -0.5, 0.0);
next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0) next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0)
}, },
@ -300,7 +301,8 @@ impl Animation for WieldAnimation {
match hands { match hands {
(None | Some(Hands::One), Some(Hands::One)) => { (None | Some(Hands::One), Some(Hands::One)) => {
next.control_r.position = Vec3::new(7.0, 8.0, 2.0); next.control_r.position = Vec3::new(7.0, 8.0, 2.0);
next.control_r.orientation = Quaternion::rotation_x(-0.3); next.control_r.orientation =
Quaternion::rotation_x(-0.3) * Quaternion::rotation_y(-0.2);
next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); next.hand_r.position = Vec3::new(0.0, -0.5, 0.0);
next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0) next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0)
}, },