diff options
Diffstat (limited to 'source/gameengine/Converter/BL_ActionActuator.cpp')
-rw-r--r-- | source/gameengine/Converter/BL_ActionActuator.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index ac35007129a..859bcab5c6a 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -232,6 +232,16 @@ bool BL_ActionActuator::Update(double curtime, bool frame) apply=false; } break; + case ACT_ACTION_PINGPONG: + if (bPositiveEvent){ + if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + m_flag &= ~ACT_FLAG_KEYUP; + m_localtime = m_starttime; + m_starttime = curtime; + m_flag |= ACT_FLAG_LOCKINPUT; + } + } + break; case ACT_ACTION_FLIPPER: if (bPositiveEvent){ if (!(m_flag & ACT_FLAG_LOCKINPUT)){ @@ -306,6 +316,18 @@ bool BL_ActionActuator::Update(double curtime, bool frame) break; case ACT_ACTION_LOOP_STOP: break; + case ACT_ACTION_PINGPONG: + if (wrap){ + if (!(m_flag & ACT_FLAG_REVERSE)) + m_localtime = m_endframe; + else + m_localtime = m_startframe; + + m_flag &= ~ACT_FLAG_LOCKINPUT; + m_flag ^= ACT_FLAG_REVERSE; //flip direction + keepgoing = false; + } + break; case ACT_ACTION_FLIPPER: if (wrap){ if (!(m_flag & ACT_FLAG_REVERSE)){ |