diff --git a/public/assets/audio/lotta-damage.mp3 b/public/assets/audio/lotta-damage.mp3 new file mode 100644 index 000000000..f70b11d91 Binary files /dev/null and b/public/assets/audio/lotta-damage.mp3 differ diff --git a/src/components/Armor/components/ShotDisplay.tsx b/src/components/Armor/components/ShotDisplay.tsx index 0c2502c35..b924f76a3 100644 --- a/src/components/Armor/components/ShotDisplay.tsx +++ b/src/components/Armor/components/ShotDisplay.tsx @@ -43,7 +43,7 @@ export function ShotDisplay() { let animationStartTime: number | null = null; useEffect(() => { - if (shot && shot.splashRadius !== undefined) { + if (shot?.splashRadius !== undefined) { const outlineGeometry = new BufferGeometry().setFromPoints( new Path().absarc(0, 0, 1, 0, Math.PI * 2).getSpacedPoints(50), ); @@ -65,6 +65,16 @@ export function ShotDisplay() { } }); + useEffect(() => { + if (shot?.splashRadius !== undefined && shot.in.status === 'penetration') { + const audio = new Audio('/assets/audio/lotta-damage.mp3'); + + audio.currentTime = 0.7; + audio.volume = 0.25; + audio.play(); + } + }, [shot]); + useFrame(({ clock }) => { if (!shot) return;