diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index f6b5fd1794..97e137fde4 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -49,7 +49,10 @@ impl Animation for AlphaAnimation { match ability_info.and_then(|a| a.tool) { Some(ToolKind::Sword | ToolKind::Dagger) => { - if matches!(stage_section, Some(StageSection::Action | StageSection::Recover)) { + if matches!( + stage_section, + Some(StageSection::Action | StageSection::Recover) + ) { next.main_weapon_trail = true; } next.main.position = Vec3::new(0.0, 0.0, 0.0); diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index a3af96cb2d..f74244bf93 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -6452,7 +6452,7 @@ impl FigureState { ) { let weapon_offsets = new_weapon_trail_mat.map(|mat| { let (trail_start, trail_end) = match tools.0 { - Some(ToolKind::Sword) => (20.25, 29.25), + Some(ToolKind::Sword) => (0.0, 29.25), // TODO: Make sure these are good positions, only did tweaking on sword Some(ToolKind::Axe) => (10.0, 19.25), Some(ToolKind::Hammer) => (10.0, 19.25), diff --git a/voxygen/src/scene/trail.rs b/voxygen/src/scene/trail.rs index c148bf9e77..e6313081c8 100644 --- a/voxygen/src/scene/trail.rs +++ b/voxygen/src/scene/trail.rs @@ -48,12 +48,18 @@ impl TrailMgr { self.entity_meshes.values_mut().for_each(|mesh| { // Shrink size of each quad over time let vertices = mesh.vertices_mut_vec(); + let last_offset = + (self.offset + TRAIL_DYNAMIC_MODEL_SIZE - 1) % TRAIL_DYNAMIC_MODEL_SIZE; + let next_offset = (self.offset + 1) % TRAIL_DYNAMIC_MODEL_SIZE; for i in 0..TRAIL_DYNAMIC_MODEL_SIZE { // Verts per quad are in b, c, a, d order - vertices[i * 4 + 2] = vertices[i * 4 + 2] * TRAIL_SHRINKAGE - + vertices[i * 4] * (1.0 - TRAIL_SHRINKAGE); - if i != (self.offset + TRAIL_DYNAMIC_MODEL_SIZE - 1) % TRAIL_DYNAMIC_MODEL_SIZE - { + vertices[i * 4 + 2] = if i == next_offset { + vertices[i * 4] + } else { + vertices[i * 4 + 2] * TRAIL_SHRINKAGE + + vertices[i * 4] * (1.0 - TRAIL_SHRINKAGE) + }; + if i != last_offset { // Avoid shrinking edge of most recent quad so that edges of quads align vertices[i * 4 + 3] = vertices[i * 4 + 3] * TRAIL_SHRINKAGE + vertices[i * 4 + 1] * (1.0 - TRAIL_SHRINKAGE);