diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 04:58:15 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 04:58:15 +0300 |
| commit | 4e4a0795fccbcc4a2dd2f4b51c8f8f7802812791 (patch) | |
| tree | 3cd67b59d94feb1fd1515be4f0c69134a86a6cde /crates/fparkan-runtime/src/unit_patrol.rs | |
| parent | 531753ef5fbfa846b4291864458f511d5c7e1b59 (diff) | |
| download | fparkan-4e4a0795fccbcc4a2dd2f4b51c8f8f7802812791.tar.xz fparkan-4e4a0795fccbcc4a2dd2f4b51c8f8f7802812791.zip | |
feat(movement): play authored walking cycles from chassis travel
Select a closed forward stride from the model for explicit walking profiles. Drive it from world displacement and subtract baked forward travel before updating geometry, mounts and shadows.
Verified light, medium and heavy stock model cycles and watched leg poses change from the normal AutoDemo start with Vulkan validation clean. Stop transitions and terrain-adaptive feet remain open.
Diffstat (limited to 'crates/fparkan-runtime/src/unit_patrol.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/unit_patrol.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/fparkan-runtime/src/unit_patrol.rs b/crates/fparkan-runtime/src/unit_patrol.rs index 57e01b78..0eaf04fc 100644 --- a/crates/fparkan-runtime/src/unit_patrol.rs +++ b/crates/fparkan-runtime/src/unit_patrol.rs @@ -424,7 +424,7 @@ impl UnitPatrol { count_rng: &mut u32, ) -> Result<PreparedPatrol, EngineError> { let terrain = &mission.terrain; - let chassis = &mission.unit_can_fly; + let chassis = &mission.unit_chassis_flags; let mut state = self.clone(); state.advance_script_orders(world, &mission.control_device_tables); state.units.retain(|unit| { @@ -449,7 +449,7 @@ impl UnitPatrol { let from = before.position.map(f32::from_bits); let motion_object = crate::CombatObject::read(world, unit.handle); let original_id = motion_object.original_id.unwrap_or(unit.handle.slot); - let can_fly = chassis.get(&original_id).copied().flatten(); + let can_fly = chassis.get(&original_id).and_then(|flags| flags.can_fly); if let Some(destinations) = &mut unit.destinations { if destinations .front() |
