fix: custom shell explosion radius

This commit is contained in:
tresabhi committed 2024-11-14 20:53:21 -06:00
1 parent b9f68d99e1
commit d9958558b5
2 files changed
+2 -3

No files matched your search

@@ -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<Mesh>(null);
const outTracer = useRef<Mesh>(null);
@@ -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: {