From 5ad056292d91bd6a38299c5d890a975a435c8422 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 13:53:28 +0400 Subject: feat(player): lower the communicator field on capture Drive the original CTLD type-13 tracks from the local capture. The Constructor window replay shows the raised and lowered field and four player projectiles stop at the mesh. Leaving resumes the authored open pose. Motion timing and exit trigger remain approximate. --- apps/fparkan-game/src/main.rs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'apps/fparkan-game/src/main.rs') diff --git a/apps/fparkan-game/src/main.rs b/apps/fparkan-game/src/main.rs index 25b89354..cbd81e22 100644 --- a/apps/fparkan-game/src/main.rs +++ b/apps/fparkan-game/src/main.rs @@ -7411,15 +7411,23 @@ fn update_gameplay_animation_pose_buffers( } } } - if component_index == 0 && fparkan_runtime::has_proximity_doors(&instance.control) { + if component_index == 0 { if let Some((root, engine)) = motion.and_then(|(roots, _, engine)| { Some((roots.get(object_index)?.as_ref()?, engine)) }) { - fparkan_runtime::sample_capture_doors( + if fparkan_runtime::has_proximity_doors(&instance.control) { + fparkan_runtime::sample_capture_doors( + engine, + root.handle, + &instance.control, + &mut instance.door_blends, + &mut node_times, + ); + } + fparkan_runtime::sample_capture_barrier( engine, root.handle, &instance.control, - &mut instance.door_blends, &mut node_times, ); } @@ -10568,7 +10576,11 @@ impl StaticVulkanApp { }) .map_err(|error| format!("query projectile terrain: {error}"))?; if !stays { - let reason = if let Some(hit) = unit_contact { + let reason = if unit_contact.is_some_and(|hit| { + hit.node == Some(fparkan_runtime::ProjectileNode::CaptureBarrier) + }) { + "communicator-field" + } else if let Some(hit) = unit_contact { match draw.volume.map(|volume| apply_projectile_contact(engine, hit, volume)).transpose() { Ok(Some(Some((remaining, removed)))) => eprintln!( "player_projectile_hit shooter={} pool={pool} target={} remaining={remaining} removed={removed} queue_time_ms={clock_ms}", shooter.slot, hit.handle.slot, -- cgit v1.2.3