From b609fcbac7745bfae680ffa5f9efc162b3c3408e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 29 Jul 2024 20:23:33 -0500 Subject: [PATCH] fix: ricochet penetration reporation of external modules --- .../Armor/components/SpacedArmorSceneComponent/index.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx b/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx index 68050dba1..19b9e8329 100644 --- a/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx +++ b/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx @@ -288,6 +288,15 @@ export function SpacedArmorSceneComponent({ } } + if ( + !allowRicochet && + !noDuplicateIntersections.some((intersection) => { + intersection.object.userData.type === ArmorType.Core; + }) + ) { + return null; + } + let remainingPenetration = remainingPenetrationInput ?? penetration; let index = 0; for (const intersection of noDuplicateIntersections) {