From 5844c9b0f4216da47cf03894b34f9a150fd5b170 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 09:31:05 +0400 Subject: feat(render): hide exhausted chassis geometry Use provider depletion and the node visibility flag to suppress the projected Vulkan ranges of a failed chassis part. The matching camera fixture shows the heavy warbot losing one track section after a hit while the rest of the hull remains visible. --- apps/fparkan-game/src/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (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 f33505bb..0d134277 100644 --- a/apps/fparkan-game/src/main.rs +++ b/apps/fparkan-game/src/main.rs @@ -8,6 +8,7 @@ mod camera_capture; mod chassis_animation; #[cfg(windows)] mod control_effects; +mod damage_visibility; mod debris; mod destruction_effects; mod motion_effects; @@ -11959,6 +11960,15 @@ impl StaticVulkanApp { .map_err(|error| format!("hide inactive destruction sprite: {error}"))?; } } + if let Some(engine) = &self.mission_engine { + damage_visibility::apply( + engine, + &self.dynamic_component_geometry, + &self.component_pose_buffers, + &self.mesh, + renderer, + )?; + } if !self.removed_mission_roots.is_empty() || self.boarded_hero_index.is_some() { for (index, range) in self.mesh.draw_ranges.iter().enumerate() { if range.owner_scope.checked_sub(1).is_some_and(|owner| { -- cgit v1.2.3