Seasons: snow above ground in winter, glowing pumpkins at Halloween
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
95f9512b83
commit
74837f1c34
3 files changed
+62
-2
No files matched your search
+11
@@ -1893,6 +1893,17 @@ app.pending_briefing = briefing_of(&campaign, i);
|
||||
}
|
||||
}
|
||||
app.game.smooth_display(dt);
|
||||
// winter: snow falls on the land above ground near the camera
|
||||
if render3d::season() == 2 && !app.game.map.sky.is_empty() && app.game.parts.len() < 3000 {
|
||||
let (cx, cz) = (app.cam.tx, app.cam.tz);
|
||||
for _ in 0..3 {
|
||||
let x = cx + (rand::gen_range(-1.0f32, 1.0)) * app.cam.zoom * 0.8;
|
||||
let z = cz + (rand::gen_range(-1.0f32, 1.0)) * app.cam.zoom * 0.8;
|
||||
if inb(x as i32, z as i32) && app.game.map.sky(map::idx(x as i32, z as i32)) {
|
||||
app.game.parts.push(particles::Part { kind: particles::EMBER, x, y: z, h: 4.0, vx: rand::gen_range(-0.2f32, 0.2), vy: 0.0, vh: -0.6, t: 0.0, max: 6.0, col: particles::abgr(245, 248, 255), size: 0.04 });
|
||||
}
|
||||
}
|
||||
}
|
||||
let hear = app.cam.zoom * 1.2;
|
||||
let (right, _) = app.cam.ground_axes();
|
||||
for ev in app.game.events.drain(..) {
|
||||
|
||||
Reference in new issue
Block a user