Imps set up torch stands in big rooms on their own ground
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6c16bc7b18
commit
c5378d0774
3 files changed
+122
-12
No files matched your search
+4
-4
@@ -398,19 +398,19 @@ impl Game {
|
||||
|
||||
// a thin wisp of smoke above every known torch, now and then a spark
|
||||
fn spawn_torch_smoke(&mut self, dt: f32) {
|
||||
let spots: Vec<(f32, f32)> = self.torches.iter().filter(|t| self.map.shown(t.wall)).map(|t| t.pos()).collect();
|
||||
for (x, y) in spots {
|
||||
let spots: Vec<(f32, f32, f32)> = self.torches.iter().filter(|t| self.map.shown(t.wall)).map(|t| (t.pos().0, t.pos().1, t.flame_h())).collect();
|
||||
for (x, y, fh) in spots {
|
||||
if self.parts.len() >= PARTS_MAX - 100 {
|
||||
break;
|
||||
}
|
||||
if self.vrng.f() < 1.1 * dt {
|
||||
let v = ((self.vrng.f() - 0.5) * 0.08, (self.vrng.f() - 0.5) * 0.08, 0.32 + self.vrng.f() * 0.12);
|
||||
let life = 1.8 + self.vrng.f() * 0.6;
|
||||
self.part(SMOKE, (x, y, 1.0), v, life, abgr(70, 62, 58), 0.05);
|
||||
self.part(SMOKE, (x, y, fh + 0.28), v, life, abgr(70, 62, 58), 0.05);
|
||||
}
|
||||
if self.vrng.f() < 0.25 * dt {
|
||||
let v = ((self.vrng.f() - 0.5) * 0.3, (self.vrng.f() - 0.5) * 0.3, 0.9);
|
||||
self.part(EMBER, (x, y, 0.95), v, 0.9, abgr(255, 170, 60), 0.025);
|
||||
self.part(EMBER, (x, y, fh + 0.23), v, 0.9, abgr(255, 170, 60), 0.025);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user