forked from mirror/openmw-tes3mp
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,9 +519,24 @@ Ogre::Vector3 Animation::runAnimation(float duration)
|
|||
if(!handleTextKey(layeridx, key))
|
||||
break;
|
||||
}
|
||||
|
||||
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