From 4a28cabc26da701b73180e2f816fe3862808c085 Mon Sep 17 00:00:00 2001 From: cha0s Date: Wed, 1 May 2019 20:06:05 -0500 Subject: [PATCH] chore: unroll --- common/combat/damaging.trait.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/combat/damaging.trait.js b/common/combat/damaging.trait.js index b6d020f..43a4d26 100644 --- a/common/combat/damaging.trait.js +++ b/common/combat/damaging.trait.js @@ -41,8 +41,10 @@ export class Damaging extends Trait { const isCollidingWith = this.entity.isCollidingWith; for (let i = 0; i < isCollidingWith.length; i++) { const entity = isCollidingWith[i]; - if (entity.is('vulnerable') && !entity.isInvulnerable) { - entity.takeDamageFrom(this.entity); + if (entity.is('vulnerable')) { + if (!entity.isInvulnerable) { + entity.takeDamageFrom(this.entity); + } } } }