Fixes for T41168

after the completion of the action in "Flipper", layer is removed and the actuator mistakenly receive zero when trying to get the current frame

Patch Author: avrprj

Reviewers: moguri

Projects: #game_logic

Differential Revision: https://developer.blender.org/D906
This commit is contained in:
Mitchell Stokes 2014-12-02 19:06:19 -08:00
parent af92f3d325
commit 5996ad2fd4
Notes: blender-bot 2023-02-14 09:39:04 +01:00
Referenced by issue #43138, Broken Flipper Animations 2.71+2.72
1 changed files with 2 additions and 1 deletions

View File

@ -320,8 +320,9 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
case ACT_ACTION_FLIPPER:
// Convert into a play action and play back to the beginning
float temp = end;
end = start;
start = obj->GetActionFrame(m_layer);
start = curr_action ? obj->GetActionFrame(m_layer) : temp;
obj->PlayAction(m_action->id.name+2, start, end, m_layer, m_priority, 0, BL_Action::ACT_MODE_PLAY, m_layer_weight, m_ipo_flags, 1.f, blendmode);
m_flag |= ACT_FLAG_PLAY_END;