@adatechnology/game-contracts 0.28.0 → 0.29.0

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.
package/dist/index.js CHANGED
@@ -28,6 +28,13 @@ function sideOnImpulse(tnt, distance) {
28
28
  const scaled = 0.067 * Math.sqrt(1 + (z / 0.23) ** 4) / (z * z * Math.cbrt(1 + (z / 1.55) ** 3));
29
29
  return scaled * w3 * 100;
30
30
  }
31
+ var ATMOSPHERE = 101325;
32
+ function sideOnOverpressure(tnt, distance) {
33
+ if (!(tnt > 0)) return 0;
34
+ const z = Math.max(distance, NEAREST) / Math.cbrt(tnt);
35
+ const ratio = 808 * (1 + (z / 4.5) ** 2) / (Math.sqrt(1 + (z / 0.048) ** 2) * Math.sqrt(1 + (z / 0.32) ** 2) * Math.sqrt(1 + (z / 1.35) ** 2));
36
+ return ratio * ATMOSPHERE;
37
+ }
31
38
  function bodyImpulse(tnt, distance) {
32
39
  if (!(tnt > 0)) return 0;
33
40
  const z = Math.max(distance, NEAREST) / Math.cbrt(tnt);
@@ -1271,6 +1278,7 @@ export {
1271
1278
  shotExtras,
1272
1279
  shotToHit,
1273
1280
  sideOnImpulse,
1281
+ sideOnOverpressure,
1274
1282
  sparkTargetFactor,
1275
1283
  stepKnock,
1276
1284
  surfaceOfMaterial,