Tweaked fire particles

This commit is contained in:
Sam 2022-02-09 18:31:25 -05:00
parent bf7e84c6ae
commit 86a00e75bb
2 changed files with 18 additions and 14 deletions

View File

@ -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::<f32>() - 0.5) * 2.0;
let mut y = (rng.gen::<f32>() - 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,

View File

@ -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)