Fix T39614: Ping Pong Action doesn't work correctly

This commit is contained in:
Mitchell Stokes 2014-04-28 16:22:20 -07:00
parent a197d02b03
commit 3448822b2f
Notes: blender-bot 2023-02-14 14:09:11 +01:00
Referenced by issue #39951, Wrong menu display
Referenced by issue #39614, Ping Pong Action doesn't work correct.
Referenced by issue #29820, Ping Pong with action animation
1 changed files with 9 additions and 4 deletions

View File

@ -254,12 +254,17 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
// Handle a finished animation
if ((m_flag & ACT_FLAG_PLAY_END) && (m_flag & ACT_FLAG_ACTIVE) && obj->IsActionDone(m_layer))
{
m_flag &= ~ACT_FLAG_ACTIVE;
m_flag &= ~ACT_FLAG_ATTEMPT_PLAY;
if (m_playtype == ACT_ACTION_PINGPONG)
{
m_flag ^= ACT_FLAG_REVERSE;
return false;
}
else
{
m_flag &= ~ACT_FLAG_ACTIVE;
m_flag &= ~ACT_FLAG_ATTEMPT_PLAY;
return false;
}
}
// If a different action is playing, we've been overruled and are no longer active