Do not play same animation twice
This commit is contained in:
parent
5ff803f0aa
commit
91643240fd
1 changed files with 4 additions and 0 deletions
|
@ -43,6 +43,10 @@ void ModelSceneNode::playAnimation(shared_ptr<Animation> anim, shared_ptr<LipAni
|
|||
if (properties.scale == 0.0f) {
|
||||
properties.scale = _model->animationScale();
|
||||
}
|
||||
|
||||
// Return if same animation is already playing
|
||||
if (!_animChannels.empty() && _animChannels[0].anim == anim && _animChannels[0].lipAnim == lipAnim && _animChannels[0].properties == properties) return;
|
||||
|
||||
AnimationBlendMode blendMode = getAnimationBlendMode(properties.flags);
|
||||
|
||||
switch (blendMode) {
|
||||
|
|
Loading…
Reference in a new issue