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:
@@ -147,7 +147,7 @@ fn a_blast_from_behind_hurts_the_link_a_blast_from_the_front_the_drive() {
|
||||
let id = sim.id();
|
||||
sim.sams.push(Sam::new(id, SamKind::Patriot, at, 0.0));
|
||||
let mut out = Out::default();
|
||||
sim.blast_damage(at + DVec3::new(0.0, 3.0, dz), 2, &mut out);
|
||||
sim.blast_damage(at + DVec3::new(0.0, 3.0, dz), 2, &Ground::default(), &mut out);
|
||||
assert!(sim.sams[0].alive());
|
||||
let c = sim.sams[0].comps;
|
||||
(1.0 - c.get(Part::Comms), 1.0 - c.get(Part::Mount), 1.0 - c.get(Part::Sensor))
|
||||
@@ -168,7 +168,7 @@ fn a_close_blast_can_leave_a_firing_but_immobile_system() {
|
||||
sim.sams.push(Sam::new(id, SamKind::Pantsir, DVec3::new(0.0, 70.0, 0.0), 0.0));
|
||||
let mut out = Out::default();
|
||||
sim.tick = seed;
|
||||
sim.blast_damage(DVec3::new(0.0, 69.0, 6.0 + seed as f64 * 0.06), 3, &mut out);
|
||||
sim.blast_damage(DVec3::new(0.0, 69.0, 6.0 + seed as f64 * 0.06), 3, &Ground::default(), &mut out);
|
||||
let s = &sim.sams[0];
|
||||
if s.alive() && s.part(Part::Tracks) <= 0.0 && s.part(Part::Launcher) > 0.0 && s.part(Part::Gun) > 0.0 {
|
||||
assert!(!sim.order_move(0, DVec3::new(300.0, 70.0, 0.0)), "failed running gear must refuse a march");
|
||||
|
||||
Reference in New Issue
Block a user