From 3a22db0a13bcb6f22249960d8d4dba09eb722ccb Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Thu, 8 Aug 2019 06:25:04 -0700 Subject: [PATCH] Last state for all node types --- libraries/animation/src/AnimRandomSwitch.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/animation/src/AnimRandomSwitch.cpp b/libraries/animation/src/AnimRandomSwitch.cpp index 45e6ae0050..8b99568f07 100644 --- a/libraries/animation/src/AnimRandomSwitch.cpp +++ b/libraries/animation/src/AnimRandomSwitch.cpp @@ -168,9 +168,7 @@ void AnimRandomSwitch::addState(RandomSwitchState::Pointer randomState) { void AnimRandomSwitch::switchRandomState(const AnimVariantMap& animVars, const AnimContext& context, RandomSwitchState::Pointer desiredState, bool shouldInterp) { auto nextStateNode = _children[desiredState->getChildIndex()]; - if (nextStateNode->getType() == AnimNodeType::Clip) { - _lastPlayedState = nextStateNode->getID(); - } + _lastPlayedState = nextStateNode->getID(); if (shouldInterp) { const float FRAMES_PER_SECOND = 30.0f;