mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 12:23:51 +00:00
Don't update controllers that have already been updated
This commit is contained in:
parent
8782ae6976
commit
e378176937
1 changed files with 17 additions and 2 deletions
|
@ -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…
Reference in a new issue