3
0
Fork 0
mirror of https://github.com/JulianGro/overte.git synced 2025-04-13 03:32:31 +02:00

Last state for all node types

This commit is contained in:
luiscuenca 2019-08-08 06:25:04 -07:00
parent 473af995d6
commit 3a22db0a13
No known key found for this signature in database
GPG key ID: 2387ECD129A6961D

View file

@ -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;