diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-24 09:33:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-24 09:33:22 +0400 |
commit | f28fd56f8f0d539e043924343683885ebc293d9f (patch) | |
tree | f9db2509e7239a5872c420bfd4a08855388fa27b /source/gameengine/Converter/BL_ActionActuator.cpp | |
parent | b6aa3073685f3f72b240cf6b82a93678316adba7 (diff) | |
parent | df22957bfce70b704b6b93958814c1ca8b2211f5 (diff) |
svn merge ^/trunk/blender -r42095:42116
Diffstat (limited to 'source/gameengine/Converter/BL_ActionActuator.cpp')
-rw-r--r-- | source/gameengine/Converter/BL_ActionActuator.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index abc45293542..1bfe5945bbc 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -144,6 +144,7 @@ void BL_ActionActuator::SetLocalTime(float curtime) case ACT_ACTION_PLAY: // Clamp m_localtime = m_endframe; + ((KX_GameObject*)GetParent())->StopAction(m_layer); break; case ACT_ACTION_LOOP_END: // Put the time back to the beginning @@ -237,14 +238,14 @@ bool BL_ActionActuator::Update(double curtime, bool frame) RemoveAllEvents(); } + // "Active" actions need to keep updating their current frame if (bUseContinue && (m_flag & ACT_FLAG_ACTIVE)) - { m_localtime = obj->GetActionFrame(m_layer); - ResetStartTime(curtime); - } if (m_flag & ACT_FLAG_ATTEMPT_PLAY) SetLocalTime(curtime); + else + ResetStartTime(curtime); // Handle a frame property if it's defined if ((m_flag & ACT_FLAG_ACTIVE) && m_framepropname[0] != 0) @@ -299,6 +300,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame) else if ((m_flag & ACT_FLAG_ACTIVE) && bNegativeEvent) { m_flag &= ~ACT_FLAG_ATTEMPT_PLAY; + m_localtime = obj->GetActionFrame(m_layer); bAction *curr_action = obj->GetCurrentAction(m_layer); if (curr_action && curr_action != m_action) { |