mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Don't update controllers that have already been updated
This commit is contained in:
parent
8782ae6976
commit
e378176937
@ -519,8 +519,23 @@ Ogre::Vector3 Animation::runAnimation(float duration)
|
||||
if(!handleTextKey(layeridx, key))
|
||||
break;
|
||||
}
|
||||
for(size_t i = 0;i < (*(mLayer[layeridx].mControllers)).size();i++)
|
||||
(*(mLayer[layeridx].mControllers))[i].update();
|
||||
|
||||
bool updatectrls = true;
|
||||
for(size_t i = layeridx-1;i < layeridx;i--)
|
||||
{
|
||||
if(mLayer[i].mGroupName.empty())
|
||||
continue;
|
||||
if(mLayer[i].mControllers == mLayer[layeridx].mControllers)
|
||||
{
|
||||
updatectrls = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(updatectrls)
|
||||
{
|
||||
for(size_t i = 0;i < (*(mLayer[layeridx].mControllers)).size();i++)
|
||||
(*(mLayer[layeridx].mControllers))[i].update();
|
||||
}
|
||||
}
|
||||
|
||||
if(mSkelBase)
|
||||
|
Loading…
x
Reference in New Issue
Block a user