From beca8adb61c9b0f6f462fcbecfce3b100e275d86 Mon Sep 17 00:00:00 2001 From: no-author Date: Wed, 22 Dec 2004 20:30:13 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'blender-2-36-release'. --- source/gameengine/Converter/BL_ActionActuator.cpp | 31 ++++++++--------------- 1 file changed, 10 insertions(+), 21 deletions(-) (limited to 'source/gameengine/Converter/BL_ActionActuator.cpp') diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 22ee2371e8c..0289ec42d74 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -166,28 +166,18 @@ bool BL_ActionActuator::Update(double curtime, bool frame) // result = true if animation has to be continued, false if animation stops // maybe there are events for us in the queue ! - if (frame) + + for (vector::iterator i=m_events.end(); !(i==m_events.begin());) { - for (vector::iterator i=m_events.end(); !(i==m_events.begin());) - { - i--; - if ((*i)->GetNumber() == 0.0f) - bNegativeEvent = true; - else - bPositiveEvent= true; - (*i)->Release(); - m_events.pop_back(); - } - - if (bPositiveEvent) - m_flag |= ACT_FLAG_ACTIVE; - - if (bNegativeEvent) + i--; + if ((*i)->GetNumber() == 0.0f) { - if (!(m_flag & ACT_FLAG_ACTIVE)) - return false; - m_flag &= ~ACT_FLAG_ACTIVE; + bNegativeEvent = true; } + else + bPositiveEvent= true; + (*i)->Release(); + m_events.pop_back(); } /* We know that action actuators have been discarded from all non armature objects: @@ -246,7 +236,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame) if (!(m_flag & ACT_FLAG_LOCKINPUT)){ m_flag &= ~ACT_FLAG_REVERSE; m_flag |= ACT_FLAG_LOCKINPUT; - SetStartTime(curtime); + m_starttime = curtime; } } else if (bNegativeEvent){ @@ -334,7 +324,6 @@ bool BL_ActionActuator::Update(double curtime, bool frame) m_localtime = m_endframe; m_flag &= ~ACT_FLAG_LOCKINPUT; } - SetStartTime(curtime); } break; case ACT_ACTION_PLAY: -- cgit v1.2.3