From 1fd51e5bbcfb4d5590fbc1ded8308fc40f6158f4 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 2 Dec 2026 19:57:36 +0400 Subject: feat(ui): enable manual control from the bunker list Use the active Control camera record and its separate CPT origin and direction for the fixed turret. The original hand control opens the cockpit, its two weapon slots and aim tracks while leaving the operator at the command post. Verified from the stock Two Fortresses start against the GOG cockpit with Vulkan validation. The licensed tests cover the native camera pose, mounted weapon selection and stationary bunker and operator. --- apps/fparkan-game/src/player_fire.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/fparkan-game/src/player_fire.rs') diff --git a/apps/fparkan-game/src/player_fire.rs b/apps/fparkan-game/src/player_fire.rs index 96123e2d..5473f3a6 100644 --- a/apps/fparkan-game/src/player_fire.rs +++ b/apps/fparkan-game/src/player_fire.rs @@ -147,6 +147,10 @@ impl StaticVulkanApp { let vector = orientation.try_transform_scaled_point(vector, scale)?; projectile_sight_target(engine, cockpit.handle, origin, vector) })(); + let fixed_turret = self + .mission_engine + .as_ref() + .is_some_and(|engine| fparkan_runtime::bunker_control::aim(engine, cockpit).is_some()); let mut firing_effects = Vec::new(); for (slot, barrel) in shots { let weapon = &weapons.weapons()[slot]; @@ -156,7 +160,7 @@ impl StaticVulkanApp { rotate_unit_vector(barrel.position, pose.rotation), ); let muzzle = transform.try_transform_scaled_point(point, scale)?; - let direction = if weapon.has_deployment_tracks() { + let direction = if fixed_turret || weapon.has_deployment_tracks() { let axis = rotate_unit_vector(barrel.direction, pose.rotation); orientation.try_transform_scaled_point(axis, scale)? } else { -- cgit v1.2.3