From d9958558b526cd53309fb8b5f142f18baa54f6e2 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Thu, 14 Nov 2024 20:53:21 -0600 Subject: [PATCH] fix: custom shell explosion radius --- .../website/src/components/Armor/components/ShotDisplay.tsx | 2 -- .../Armor/components/SpacedArmorSceneComponent/index.tsx | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/website/src/components/Armor/components/ShotDisplay.tsx b/packages/website/src/components/Armor/components/ShotDisplay.tsx index 2f70f7b3d..cc5a966c9 100644 --- a/packages/website/src/components/Armor/components/ShotDisplay.tsx +++ b/packages/website/src/components/Armor/components/ShotDisplay.tsx @@ -16,7 +16,6 @@ import { Path, Quaternion, } from 'three'; -import { useFullScreen } from '../../../hooks/useFullScreen'; import { TankopediaEphemeral, type ShotLayerNonExternal, @@ -40,7 +39,6 @@ const TRACER_THICK = 1 / 32; const TRACER_THIN = TRACER_THICK / 2; export function ShotDisplay() { - const isFullscreen = useFullScreen(); const shot = TankopediaEphemeral.use((state) => state.shot); const inTracer = useRef(null); const outTracer = useRef(null); diff --git a/packages/website/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx b/packages/website/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx index 5f038985e..2d8666347 100644 --- a/packages/website/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx +++ b/packages/website/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx @@ -92,7 +92,8 @@ export function SpacedArmorSceneComponent({ const shell = customShell ?? antagonist.shell; const cameraNormal = camera.position.clone().sub(point).normalize(); const shot: Shot = { - splashRadius: shell.explosion_radius, + splashRadius: + shell.type === ShellType.HE ? shell.explosion_radius : undefined, damage: -1, containsGaps: shell.type === ShellType.HEAT, in: {