diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 08:31:05 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 08:31:05 +0300 |
| commit | 5844c9b0f4216da47cf03894b34f9a150fd5b170 (patch) | |
| tree | 359612b20341eddd1a0ab27be4e5c7e2c81f0f6a /apps/fparkan-game/src/main.rs | |
| parent | ce4fdc768602efe7c621e631c1390d8d76248505 (diff) | |
| download | fparkan-5844c9b0f4216da47cf03894b34f9a150fd5b170.tar.xz fparkan-5844c9b0f4216da47cf03894b34f9a150fd5b170.zip | |
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.
Diffstat (limited to 'apps/fparkan-game/src/main.rs')
| -rw-r--r-- | apps/fparkan-game/src/main.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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| { |
