From 73b6ee4d046e23761aba1dab276b620c4e7b4816 Mon Sep 17 00:00:00 2001 From: cha0s Date: Fri, 3 May 2019 01:22:42 -0500 Subject: [PATCH] fix: only listen to action finished once --- common/combat/alive.trait.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/combat/alive.trait.js b/common/combat/alive.trait.js index 5781c00..225af64 100644 --- a/common/combat/alive.trait.js +++ b/common/combat/alive.trait.js @@ -106,7 +106,7 @@ export class Alive extends decorate(Trait) { forceDeath: () => { this._isDying = true; this.entity.emit('dying'); - this._deathActions.on('actionsFinished', () => { + this._deathActions.once('actionsFinished', () => { if (this.entity.is('existent')) { this.entity.destroy(); }