mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 21:06:41 +00:00
Clear the old text keys when setting new animation sources
This commit is contained in:
parent
399394ff10
commit
80a1abd48a
1 changed files with 2 additions and 1 deletions
|
@ -63,6 +63,7 @@ void Animation::setAnimationSources(const std::vector<std::string> &names)
|
||||||
mAnimVelocity = 0.0f;
|
mAnimVelocity = 0.0f;
|
||||||
mAccumRoot = NULL;
|
mAccumRoot = NULL;
|
||||||
mNonAccumRoot = NULL;
|
mNonAccumRoot = NULL;
|
||||||
|
mTextKeys.clear();
|
||||||
mSkeletonSources.clear();
|
mSkeletonSources.clear();
|
||||||
|
|
||||||
std::vector<std::string>::const_iterator nameiter;
|
std::vector<std::string>::const_iterator nameiter;
|
||||||
|
@ -96,7 +97,7 @@ void Animation::setAnimationSources(const std::vector<std::string> &names)
|
||||||
{
|
{
|
||||||
Ogre::Animation *anim = skel->getAnimation(i);
|
Ogre::Animation *anim = skel->getAnimation(i);
|
||||||
const Ogre::Any &groupdata = bindings.getUserAny(std::string(NifOgre::sTextKeyExtraDataID)+
|
const Ogre::Any &groupdata = bindings.getUserAny(std::string(NifOgre::sTextKeyExtraDataID)+
|
||||||
"@"+anim->getName());
|
"@"+anim->getName());
|
||||||
if(!groupdata.isEmpty())
|
if(!groupdata.isEmpty())
|
||||||
mTextKeys[anim->getName()] = Ogre::any_cast<NifOgre::TextKeyMap>(groupdata);
|
mTextKeys[anim->getName()] = Ogre::any_cast<NifOgre::TextKeyMap>(groupdata);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue