Raid replays: recording, raid map, event clips, full replay, highlight reel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 23:25:40 +03:00
parent 8fd28a2de2
commit bf966a4dbe
13 changed files with 1145 additions and 17 deletions
+2
View File
@@ -81,6 +81,7 @@ impl Sim {
sam.bursts = 0;
let pos = sam.pos + DVec3::Y;
out.messages.push(format!("{} №{} УНИЧТОЖЕН", sam.kind.name(), i + 1));
let (id, kind) = (sam.id, sam.kind);
let charge = spec.missile.as_ref().map_or(0.0, |m| m.kind.charge() * missiles as f64) + bursts as f64 / 60.0;
// The vehicle's own fuel and the first of its load at once, then the rest cooking off.
let first = (1.0 + charge * 0.6).round().clamp(1.0, 8.0) as u32;
@@ -91,6 +92,7 @@ impl Sim {
let tnt = if charge > 4.0 && self.rng.chance(0.4) { 2 } else { 1 };
self.later.push((when, at, tnt, true));
}
self.log(pos, record::EventKind::SamLost { sam: id, kind, index: i });
// Shells pop in strings.
for k in 0..(bursts / 12).min(14) {
let when = now + 10 + (k as u64) * 6 + (self.rng.f() * 8.0) as u64;