diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-14 04:25:08 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-14 04:25:08 +0300 |
| commit | 5f4eecaad3bfdf025e93f5c7276b0ba3f9b6db49 (patch) | |
| tree | 729e1c39504f5b52bc3c31c4d4ff63d6c7485d3d /crates/fparkan-runtime/src/lib.rs | |
| parent | 9b06d97af705cb5616c76273aef9291538bf07ae (diff) | |
| download | fparkan-5f4eecaad3bfdf025e93f5c7276b0ba3f9b6db49.tar.xz fparkan-5f4eecaad3bfdf025e93f5c7276b0ba3f9b6db49.zip | |
feat(game): drive AutoDemo camera from mission intervals
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index 198357f3..186e4f73 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -41,8 +41,10 @@ use std::collections::HashMap; use std::num::NonZeroUsize; use std::sync::Arc; +mod autodemo; mod mesh_collision; +pub use autodemo::{autodemo_camera, AutoDemoCamera, AutoDemoView}; pub use fparkan_assets::MissionAssets; pub use mesh_collision::{query_building_segment_world, BuildingMeshHit, BuildingMeshNode}; @@ -2577,6 +2579,14 @@ pub fn starting_cockpit(engine: &Engine) -> Option<StartingCockpit> { return None; } let handle = mission_object_handle(engine, hero.original_id?)?; + component_cockpit(mission, object_index, handle) +} + +fn component_cockpit( + mission: &LoadedMissionState, + object_index: usize, + handle: ObjectHandle, +) -> Option<StartingCockpit> { let mut points = mission .mission_assets .object_component_controls |
