Fix ping-pong actions when using the Action Actuator.

This commit is contained in:
Mitchell Stokes 2014-12-10 21:20:19 -08:00
parent 2617d37034
commit 1999b5a814

@ -256,13 +256,15 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
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)
if (m_playtype == ACT_ACTION_PINGPONG) {
m_flag ^= ACT_FLAG_REVERSE;
else
}
else {
m_flag &= ~ACT_FLAG_ATTEMPT_PLAY;
return false;
}
}
// If a different action is playing, we've been overruled and are no longer active
if (obj->GetCurrentAction(m_layer) != m_action && !obj->IsActionDone(m_layer))