From 86a00e75bb03bb053991380ca3b5db2f1ede40f0 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 9 Feb 2022 18:31:25 -0500 Subject: [PATCH] Tweaked fire particles --- voxygen/src/scene/particle.rs | 16 ++++++++++------ world/src/site2/plot/gnarling.rs | 16 ++++++++-------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/voxygen/src/scene/particle.rs b/voxygen/src/scene/particle.rs index 18ec03b502..68e9a86789 100644 --- a/voxygen/src/scene/particle.rs +++ b/voxygen/src/scene/particle.rs @@ -978,10 +978,15 @@ impl ParticleMgr { kind: buff::BuffKind::Burning, .. } => { - let num_particles = aura.radius.powi(2) * dt / inline_tweak::tweak!(20.0); - self.particles.resize_with( - self.particles.len() + num_particles as usize, - || { + let num_particles = aura.radius.powi(2) * dt / inline_tweak::tweak!(250.0); + let num_particles = num_particles.floor() as usize + + if rng.gen_bool(f64::from(num_particles % 1.0)) { + 1 + } else { + 0 + }; + self.particles + .resize_with(self.particles.len() + num_particles, || { let rand_pos = { let mut x = (rng.gen::() - 0.5) * 2.0; let mut y = (rng.gen::() - 0.5) * 2.0; @@ -999,8 +1004,7 @@ impl ParticleMgr { rand_pos.with_z(pos.0.z), rand_pos.with_z(pos.0.z + 1.0), ) - }, - ); + }); }, aura::AuraKind::Buff { kind: buff::BuffKind::Hastened, diff --git a/world/src/site2/plot/gnarling.rs b/world/src/site2/plot/gnarling.rs index 6abca571e4..cabd51e5ed 100644 --- a/world/src/site2/plot/gnarling.rs +++ b/world/src/site2/plot/gnarling.rs @@ -489,7 +489,7 @@ impl Structure for GnarlingFortification { let mosstop1 = root1.translate(Vec3::new(0, 0, 1)); - root1.fill(darkwood.clone()); + root1.fill(darkwood); let start = (start_wpos + 3) .as_() @@ -512,10 +512,10 @@ impl Structure for GnarlingFortification { let mosstop2 = root2.translate(Vec3::new(0, 0, 1)); - root2.fill(lightwood.clone()); + root2.fill(lightwood); mosstop1.intersect(mossroot).fill(moss.clone()); - mosstop2.intersect(mossroot).fill(moss.clone()); + mosstop2.intersect(mossroot).fill(moss); }) } @@ -593,7 +593,7 @@ impl Structure for GnarlingFortification { tower_radius - 4.0, tower_height, )) - .fill(lightwood.clone()); + .fill(lightwood); //top layer, green above the tower painter .prim(Primitive::cylinder( @@ -765,7 +765,7 @@ impl Structure for GnarlingFortification { hut_radius - 2.0, hut_wall_height + 3.0, )) - .fill(lightwood.clone()); + .fill(lightwood); painter .prim(Primitive::cylinder( floor_pos, @@ -920,7 +920,7 @@ impl Structure for GnarlingFortification { let floor2_pos = wpos.with_z(alt + 1 + raise + height_1 as i32); painter .prim(Primitive::cylinder(floor2_pos, rad_2, height_2)) - .fill(lightwood.clone()); + .fill(lightwood); // Roof let roof_radius = rad_1 + 5.0; @@ -1177,8 +1177,8 @@ impl Structure for GnarlingFortification { let roof = low1.union(low2).union(top1).union(top2); let roofmoss = roof.translate(Vec3::new(0, 0, 1)).without(top).without(low); top.fill(darkwood.clone()); - low.fill(lightwood.clone()); - roofmoss.fill(moss.clone()); + low.fill(lightwood); + roofmoss.fill(moss); painter .prim(Primitive::sphere( Vec2::new(wpos.x + rand.y - 5, wpos.y + rand.z - 5)