aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/lib.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-26 13:00:09 +0300
committerValentin Popov <valentin@popov.link>2026-11-26 13:00:09 +0300
commit514136ca97191672ecd24173d1836cdc4d26493b (patch)
tree2f7f21d8d7e6182ec283636e6c1d9a340fba62eb /crates/fparkan-runtime/src/lib.rs
parent5ad056292d91bd6a38299c5d890a975a435c8422 (diff)
downloadfparkan-514136ca97191672ecd24173d1836cdc4d26493b.tar.xz
fparkan-514136ca97191672ecd24173d1836cdc4d26493b.zip
feat(player): bob the cockpit view when walking
Use the 0.45 second vertical cycle observed in the GOG hero camera. The stock Firing Range window shows lift on an accepted walk and settles on release. The body and muzzle still use their own poses.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
-rw-r--r--crates/fparkan-runtime/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs
index 0dc5e4a5..11bac68d 100644
--- a/crates/fparkan-runtime/src/lib.rs
+++ b/crates/fparkan-runtime/src/lib.rs
@@ -94,6 +94,7 @@ pub use laboratory::LaboratoryReport;
mod mission_events;
mod ore_transport;
mod patrol_points;
+mod player_gait;
mod player_motion;
mod unit_speed;
pub use patrol_points::PatrolPointReport;
@@ -154,6 +155,7 @@ pub use mission_events::{
capture_building, capture_building_with_notice, capture_neutral_building,
capture_neutral_warbot, MissionEventStop, MissionEventTick, MissionNotice,
};
+pub use player_gait::player_walk_camera_lift;
pub use player_motion::{
plan_player_motion, plan_player_motion_with_collision, PlayerMotion, PlayerMotionStep,
};
@@ -1455,6 +1457,7 @@ struct LoadedMissionState {
construction: construction::Construction,
unit_patrol: Option<unit_patrol::UnitPatrol>,
player_pitch_bits: u32,
+ player_gait: player_gait::PlayerGait,
boarding: Option<boarding::Boarding>,
local_hero: Option<ObjectHandle>,
script_host_mode: MissionMode,
@@ -2811,6 +2814,7 @@ node_provider_distribution_suspended: false,
construction,
unit_patrol,
player_pitch_bits: 0,
+ player_gait: Default::default(),
boarding: None,
local_hero,
script_host_mode: request.mode,
@@ -2909,6 +2913,7 @@ pub fn step_headless(
}
if let Some(mission) = &mut engine.loaded {
capture_barrier::advance(mission, &engine.world, queue_time_ms);
+ player_gait::advance(mission, &engine.world, queue_time_ms);
control_resources::tick(mission, &engine.world, queue_time_ms);
}
let (autodemo_combat_events, autodemo_combat_unavailable) =