From 8f52240e5800463333741949e67b5c4b3f11003f Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Sat, 13 Oct 2018 09:53:16 -0700 Subject: [PATCH] fix miss hit getting emitted when restarting / clearing --- src/components/beat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/beat.js b/src/components/beat.js index ab468e8..82d27f5 100644 --- a/src/components/beat.js +++ b/src/components/beat.js @@ -405,7 +405,6 @@ AFRAME.registerComponent('beat', { returnToPool: function (force) { if (!this.backToPool && !force) { return; } - if (!this.destroyed) { this.missHit(); } this.el.sceneEl.components[this.poolName].returnEntity(this.el); }, @@ -474,6 +473,7 @@ AFRAME.registerComponent('beat', { this.backToPool = this.returnToPoolTimer <= 0; } + if (!this.destroyed) { this.missHit(); } this.returnToPool(); }; })(),