BGE: Fix T46381 : last action frame not updated.
It fix T46381. Normally BL_Action::Update (manage action time, end, loop…) should be called the same number of times as BL_Action::UpdateIPO (update action position, scale ect… in the game object).
But the bug report shows that UpdateIPO is called one less time than Update. To fix it i revert the commit 362b25b382 and implement a mutex in BL_Action::Update.
Example file : {F245823}
Reviewers: lordloki, kupoman, campbellbarton, youle, moguri, sybren
Reviewed By: youle, moguri, sybren
Maniphest Tasks: T39928, T46381
Differential Revision: https://developer.blender.org/D1562
This commit is contained in:
@@ -481,11 +481,6 @@ void KX_GameObject::UpdateActionManager(float curtime)
|
||||
GetActionManager()->Update(curtime);
|
||||
}
|
||||
|
||||
void KX_GameObject::UpdateActionIPOs()
|
||||
{
|
||||
GetActionManager()->UpdateIPOs();
|
||||
}
|
||||
|
||||
float KX_GameObject::GetActionFrame(short layer)
|
||||
{
|
||||
return GetActionManager()->GetActionFrame(layer);
|
||||
@@ -949,6 +944,9 @@ void KX_GameObject::InitIPO(bool ipo_as_force,
|
||||
void KX_GameObject::UpdateIPO(float curframetime,
|
||||
bool recurse)
|
||||
{
|
||||
/* This function shouldn't call BL_Action::Update, not even indirectly,
|
||||
* as it will cause deadlock due to the lock in BL_Action::Update. */
|
||||
|
||||
// just the 'normal' update procedure.
|
||||
GetSGNode()->SetSimulatedTime(curframetime,recurse);
|
||||
GetSGNode()->UpdateWorldData(curframetime);
|
||||
|
||||
Reference in New Issue
Block a user