From 9b06d97af705cb5616c76273aef9291538bf07ae Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Nov 2026 05:07:29 +0400 Subject: feat(game): render mission objects from live world poses --- crates/fparkan-runtime/src/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'crates') diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index 3122ff14..198357f3 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -2259,7 +2259,7 @@ pub fn frame(engine: &mut Engine, queue_time_ms: u32) -> Result Option<&[MissionObjectDr .map(|state| state.object_drafts.as_slice()) } +/// Finds the live handle of an object placed by the mission. +#[must_use] +pub fn mission_object_handle(engine: &Engine, id: OriginalObjectId) -> Option { + handle_by_original_id(&engine.world, id) +} + /// Camera point of the single unambiguous starting hero in a mission. #[derive(Clone, Copy, Debug, PartialEq)] pub struct StartingCockpit { @@ -2570,7 +2576,7 @@ pub fn starting_cockpit(engine: &Engine) -> Option { if heroes.next().is_some() { return None; } - let handle = handle_by_original_id(&engine.world, hero.original_id?)?; + let handle = mission_object_handle(engine, hero.original_id?)?; let mut points = mission .mission_assets .object_component_controls -- cgit v1.2.3