From 44089724ae0a565d56df002e5bf8e0acb281a3b1 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 20 Dec 2019 17:16:48 +1000 Subject: [PATCH] disable wiggle onclick during animation --- client/src/components/construct.jsx | 5 +++-- core/src/skill.rs | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/components/construct.jsx b/client/src/components/construct.jsx index c8ca98a3..ec3d7813 100644 --- a/client/src/components/construct.jsx +++ b/client/src/components/construct.jsx @@ -13,8 +13,8 @@ const { ConstructAnimation } = require('./animations'); const addState = connect( function receiveState(state) { - const { animSource, animTarget, resolution, account } = state; - return { animSource, animTarget, resolution, account }; + const { animating, animSource, animTarget, resolution, account } = state; + return { animating, animSource, animTarget, resolution, account }; } ); @@ -43,6 +43,7 @@ class ConstructAvatar extends Component { } onClick() { + if (this.props.animating) return false; return this.animations.push(wiggle(this.props.construct.id, this.idle)); } diff --git a/core/src/skill.rs b/core/src/skill.rs index 0f8c15bd..9d4d3902 100644 --- a/core/src/skill.rs +++ b/core/src/skill.rs @@ -637,6 +637,9 @@ impl Skill { Skill::Heal | Skill::HealPlus | Skill::HealPlusPlus | + Skill::Hybrid | + Skill::HybridPlus | + Skill::HybridPlusPlus | Skill::Absorb | Skill::AbsorbPlus | Skill::AbsorbPlusPlus |