feat: attenuate indirect blast damage behind known cover
build / mod (push) Failing after 18s

Use a bounded read-only pre-destruction occupancy sample; preserve conservative damage for unresolved geometry and do not defer or repeat damage on replies.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
2026-11-02 23:55:38 +03:00
parent a7d400ea7e
commit c96676f3e5
8 changed files with 196 additions and 19 deletions
+1 -1
View File
@@ -1376,7 +1376,7 @@ mod tests {
sim.sams.push(Sam::new(sam, SamKind::Patriot, DVec3::new(0.0, 70.0, 0.0), 0.0));
sim.add_drone(DroneKind::Shahed, DVec3::new(0.0, 120.0, 300.0), DVec3::X, DVec3::new(900.0, 70.0, 0.0));
let at = sim.drones[0].pos;
let live = sim.shoot_down_by(0, sam, None, Impact::missile(MissileKind::M77n6, at, 6.0), &mut Out::default()).unwrap();
let live = sim.shoot_down_by(0, sam, None, Impact::missile(MissileKind::M77n6, at, 6.0), &Ground::default(), &mut Out::default()).unwrap();
let rec = sim.rec.take().unwrap();
let recorded = rec.events.iter().find_map(|e| if let EventKind::Kill { outcome, .. } = e.kind { Some(outcome) } else { None });
assert_eq!(recorded, Some(live), "the live outcome is what was recorded");