Replays show SAMs and the world as it was at raid time, film clock for exports; clouds and fog polish; shared texture generator, new missile bodies, octagonal wheels, tracked sides, charred wrecks (#55 part 1) (fork patch 33)
build / mod (push) Successful in 3m54s
build / mod (push) Successful in 3m54s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -631,11 +631,16 @@ impl Sam {
|
||||
impl Sim {
|
||||
/// Draws unit `i`: its vehicle, its launcher or turret where it points, its antennas turning.
|
||||
pub(super) fn draw_sam(&mut self, i: usize, out: &mut Out) {
|
||||
if !self.sams[i].alive() {
|
||||
self.draw_wreck(i, out);
|
||||
return;
|
||||
}
|
||||
let sam = &self.sams[i];
|
||||
draw_sam_model(&self.sams[i], &mut self.rng, out);
|
||||
}
|
||||
}
|
||||
|
||||
/// Draws a system as it stands (a live one, or a replay's ghost built from the recording).
|
||||
pub(super) fn draw_sam_model(sam: &Sam, rng: &mut Rng, out: &mut Out) {
|
||||
if !sam.alive() {
|
||||
damage::draw_wreck_of(sam, out);
|
||||
return;
|
||||
}
|
||||
let spec = sam.kind.spec();
|
||||
let parts = &spec.parts;
|
||||
let base = sam.base();
|
||||
@@ -709,9 +714,43 @@ impl Sim {
|
||||
_ => &[],
|
||||
};
|
||||
for (n, b) in barrels.iter().enumerate() {
|
||||
let r = rot * DQuat::from_rotation_z(self.rng.f() * TAU);
|
||||
let r = rot * DQuat::from_rotation_z(rng.f() * TAU);
|
||||
out.model(id + 12 + n as u32, "airdef:flash", mount + rot * *b * s, r, 0.9, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The charred variant of a part's model, for wrecks (tools/gen_models.py `WRECKS`); a part without one keeps its model.
|
||||
pub(super) fn wreck(model: &'static str) -> &'static str {
|
||||
match model {
|
||||
"airdef:patriot_trailer" => "airdef:patriot_trailer_burnt",
|
||||
"airdef:patriot_launcher" => "airdef:patriot_launcher_burnt",
|
||||
"airdef:gepard_hull" => "airdef:gepard_hull_burnt",
|
||||
"airdef:gepard_turret" => "airdef:gepard_turret_burnt",
|
||||
"airdef:gepard_guns" => "airdef:gepard_guns_burnt",
|
||||
"airdef:pantsir_truck" => "airdef:pantsir_truck_burnt",
|
||||
"airdef:pantsir_turret" => "airdef:pantsir_turret_burnt",
|
||||
"airdef:pantsir_pack" => "airdef:pantsir_pack_burnt",
|
||||
"airdef:s400_chassis" => "airdef:s400_chassis_burnt",
|
||||
"airdef:s400_tubes" => "airdef:s400_tubes_burnt",
|
||||
"airdef:s500_chassis" => "airdef:s500_chassis_burnt",
|
||||
"airdef:s500_tubes" => "airdef:s500_tubes_burnt",
|
||||
"airdef:irist_chassis" => "airdef:irist_chassis_burnt",
|
||||
"airdef:irist_tubes" => "airdef:irist_tubes_burnt",
|
||||
"airdef:nasams_trailer" => "airdef:nasams_trailer_burnt",
|
||||
"airdef:nasams_launcher" => "airdef:nasams_launcher_burnt",
|
||||
"airdef:buk_chassis" => "airdef:buk_chassis_burnt",
|
||||
"airdef:buk_turret" => "airdef:buk_turret_burnt",
|
||||
"airdef:buk_rails" => "airdef:buk_rails_burnt",
|
||||
"airdef:tor_chassis" => "airdef:tor_chassis_burnt",
|
||||
"airdef:tor_turret" => "airdef:tor_turret_burnt",
|
||||
"airdef:p1sun_launcher" => "airdef:p1sun_launcher_burnt",
|
||||
"airdef:radar_truck" => "airdef:radar_truck_burnt",
|
||||
"airdef:depot" => "airdef:depot_burnt",
|
||||
"airdef:tzm_truck" => "airdef:tzm_truck_burnt",
|
||||
"airdef:ew_truck" => "airdef:ew_truck_burnt",
|
||||
"airdef:searchlight" => "airdef:searchlight_burnt",
|
||||
"airdef:searchlight_head" => "airdef:searchlight_head_burnt",
|
||||
other => other,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user