Fixes from review: replays found by raid number, no fired-count underflow, one raid planned at a time, repair resets waiting and marches, clear removes cook-offs and flares, beams reach their targets, tracer direction never NaN, the fork's previous branch always kept
build / mod (push) Successful in 2m24s
build / mod (push) Successful in 2m24s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1272,6 +1272,10 @@ impl Sim {
|
||||
self.queue.clear();
|
||||
self.plan = None;
|
||||
self.wave = None;
|
||||
// Ammunition still to cook off, flares in the sky.
|
||||
self.later.clear();
|
||||
self.flares.clear();
|
||||
self.lit.clear();
|
||||
}
|
||||
|
||||
/// One game tick.
|
||||
@@ -1845,7 +1849,7 @@ impl Sim {
|
||||
};
|
||||
for b in barrels {
|
||||
let muzzle = mount + rot * *b * s;
|
||||
let dir = (lead - muzzle).normalize();
|
||||
let dir = (lead - muzzle).normalize_or(DVec3::NEG_Z);
|
||||
let len = muzzle.distance(lead).min(gun.range * 1.2);
|
||||
// Every round is a red tracer flying out at the shell's speed.
|
||||
let scatter = DVec3::new(self.rng.s(), self.rng.s(), self.rng.s()) * 0.012;
|
||||
|
||||
Reference in New Issue
Block a user