Release interceptor engine source at burnout
Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
@@ -113,6 +113,8 @@ pub struct Out {
|
||||
/// The engines sounding this tick (persistent sources, `crate::engines`), and whether the
|
||||
/// picture cut (a replay seek or a new shot): every engine then starts afresh.
|
||||
pub engines: Vec<EngineDecl>,
|
||||
/// Sources explicitly stopped this tick (for example, motor burnout).
|
||||
pub engine_stops: Vec<u32>,
|
||||
pub engine_cut: bool,
|
||||
pub commands: Vec<String>,
|
||||
/// Camera jolt (strength, seconds), the strongest this tick.
|
||||
@@ -2983,6 +2985,7 @@ impl Sim {
|
||||
let spec = m.kind.spec();
|
||||
let target = self.drones.iter().find(|d| d.id == m.target && d.alive());
|
||||
let lit = m.engine_lit();
|
||||
if !lit { out.engine_stops.push(0x4000_0000 | m.id); }
|
||||
let coast = m.age > spec.cold + m.kind.burn_ticks();
|
||||
if m.age == spec.cold + m.kind.burn_ticks() + 1 {
|
||||
burnouts.push((m.pos, m.id, m.kind));
|
||||
|
||||
Reference in New Issue
Block a user