@adatechnology/game-terrain 0.9.4 → 0.9.5

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
@@ -1,3 +1,6 @@
1
+ // src/terrain.ts
2
+ import { TNT_JOULES } from "@adatechnology/game-contracts";
3
+
1
4
  // src/catalog.ts
2
5
  var TERRAIN_MATERIALS = [
3
6
  {
@@ -1774,7 +1777,7 @@ function createTerrain(options) {
1774
1777
  if (above >= reach) return null;
1775
1778
  const share = (1 - above / reach) ** 2;
1776
1779
  soot(x, z, BLAST_SOOT_REACH * Math.cbrt(hit.energy * share / 1e6));
1777
- return strike("explosive", { x, z, energy: hit.energy * share });
1780
+ return strike("explosive", { x, z, energy: (hit.hasCharge && hit.tnt !== void 0 && hit.tnt > 0 ? hit.tnt * TNT_JOULES : hit.energy) * share });
1778
1781
  }
1779
1782
  case "fire":
1780
1783
  case "heat":