Skip to content

Commit

Permalink
only play hit on attack
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-ls committed Jun 7, 2024
1 parent ac791cd commit cb77726
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/entities/BigBossEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ export class BigBossEntity extends PlayerEntity {
if (this.game.getCurrentTick() - this.previousAttackTick < BOSS_ATTACK_COOLDOWN) {
return super.attack();
}
this.animator.play("hit");
if (this.game.getCurrentTick() - this.previousAttackTick > BOSS_ATTACK_COOLDOWN) {
this.animator.play("hit");
}

return {
type: "combat:damage",
Expand Down

0 comments on commit cb77726

Please sign in to comment.