diff options
| author | Valentin Popov <valentin@popov.link> | 2026-12-02 20:26:06 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-12-02 20:26:06 +0300 |
| commit | 87801add32ad300f1c7b1fc6fb449ceaf6685731 (patch) | |
| tree | feda359ba27889e32e9a9903aa9b130b5711313c /crates/fparkan-runtime/src/projectile_shield.rs | |
| parent | 5fcaba2e62a60ac88d007ecc84987c5523c93ff7 (diff) | |
| download | fparkan-87801add32ad300f1c7b1fc6fb449ceaf6685731.tar.xz fparkan-87801add32ad300f1c7b1fc6fb449ceaf6685731.zip | |
fix(ui): frame cockpit miniatures using the unit node bounds
Diffstat (limited to 'crates/fparkan-runtime/src/projectile_shield.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/projectile_shield.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/fparkan-runtime/src/projectile_shield.rs b/crates/fparkan-runtime/src/projectile_shield.rs index bb766fc5..5ff876a0 100644 --- a/crates/fparkan-runtime/src/projectile_shield.rs +++ b/crates/fparkan-runtime/src/projectile_shield.rs @@ -228,7 +228,7 @@ pub(super) fn absorb(engine: &mut Engine, hit: ProjectileContact, volume: f32) - remaining } -fn world_sphere( +pub(super) fn world_sphere( (center, radius): ([f32; 3], f32), pose: TransformState, ) -> Option<([f32; 3], f32)> { @@ -243,9 +243,9 @@ fn world_sphere( )) } -fn enclosing_sphere(parts: &[([f32; 3], f32)]) -> Option<([f32; 3], f32)> { - // AniMesh+0x9510 weights model centers by the authored radii. A second - // pass then puts even the most distant model sphere inside the result. +pub(super) fn enclosing_sphere(parts: &[([f32; 3], f32)]) -> Option<([f32; 3], f32)> { + // AniMesh+0x9510 weights centers by the authored radii. A second pass + // puts even the most distant part inside the result. let weight: f32 = parts.iter().map(|(_, radius)| radius).sum(); if weight <= 0.0 { return None; |
