diff --git a/lib/index.js b/lib/index.js index 084f673..e152b4d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -426,6 +426,8 @@ var CSGOGSI = class _CSGOGSI { } else if (last.bomb.state !== "planting" && data.bomb.state === "planting") { this.emit("bombPlantStart", last.bomb.player); } + } else if (!last.bomb && data.bomb && data.bomb.state === "exploded") { + this.emit("bombExplode"); } if (data.map.phase === "intermission" && last.map.phase !== "intermission") { this.emit("intermissionStart"); diff --git a/lib/index.mjs b/lib/index.mjs index 9efb80b..0aa3d9e 100644 --- a/lib/index.mjs +++ b/lib/index.mjs @@ -396,6 +396,8 @@ var CSGOGSI = class _CSGOGSI { } else if (last.bomb.state !== "planting" && data.bomb.state === "planting") { this.emit("bombPlantStart", last.bomb.player); } + } else if (!last.bomb && data.bomb && data.bomb.state === "exploded") { + this.emit("bombExplode"); } if (data.map.phase === "intermission" && last.map.phase !== "intermission") { this.emit("intermissionStart"); diff --git a/package.json b/package.json index 9148597..90b4a91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "csgogsi", - "version": "3.0.4", + "version": "3.0.5", "description": "", "main": "lib/index.js", "module": "lib/index.mjs", diff --git a/tsc/index.ts b/tsc/index.ts index 0f9c443..4bd95bb 100644 --- a/tsc/index.ts +++ b/tsc/index.ts @@ -398,6 +398,8 @@ class CSGOGSI { } else if (last.bomb.state !== 'planting' && data.bomb.state === 'planting') { this.emit('bombPlantStart', last.bomb.player); } + } else if (!last.bomb && data.bomb && data.bomb.state === 'exploded') { + this.emit('bombExplode'); } // Intermission (between halfs)