@adatechnology/game-floorplan-structure 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6237,13 +6237,14 @@ var GameFloorplanStructure = (() => {
6237
6237
  const crackLen = clamp22(0.03 + ratio * 0.2, 0.03, 0.8);
6238
6238
  let exitPoint;
6239
6239
  if (penetrated) {
6240
- exitPoint = vec.madd(entry2, d, Math.min(pathLen, effM + layersThickness(p.layers, face) / slant + layersThickness(p.layers, -face) / slant));
6240
+ const exitDist = p.spec.contains || p.spec.fill !== void 0 && p.spec.fill < 0.5 || p.thickness < pathLen * 0.5 ? pathLen : Math.min(pathLen, effM + layersThickness(p.layers, face) / slant + layersThickness(p.layers, -face) / slant);
6241
+ exitPoint = vec.madd(entry2, d, exitDist);
6241
6242
  const hole = addHole(o, p, entry2, n, caliber / 1e3 * (mat.ductility >= 0.3 ? 1 : 1.5), true, exitPoint, src);
6242
6243
  if (p.layers.length > 0) spallOuter(o, p, exitPoint, -face, vec.scale(n, -1), Math.max(0.03, caliber / 1e3 * 4), src);
6243
6244
  addBreach(o, p, entry2, Math.PI * (hole.diameter / 2) * (hole.diameter / 2), E, d, src);
6244
6245
  if (mat.ductility >= 0.5 && p.thickness <= THIN_SHEET_DISHING) addDent(o, p, entry2, n, Math.max(caliber * 3 / 1e3, 0.012), clamp22(E * 2e-5, 1e-3, 0.03), src);
6245
6246
  if (brittle && mat.fracture === "shatter") addCrack(o, p, entry2, n, crackLen, src);
6246
- if (p.spec.contains && (p.st.liters ?? 0) > 0) {
6247
+ if (p.spec.contains && (p.st.liters ?? 0) > 1e-4) {
6247
6248
  emit({
6248
6249
  ...base(o, src),
6249
6250
  type: "leak",