fix npc animation key update

This commit is contained in:
greye 2012-08-06 15:26:37 +04:00
parent 0e3f70413e
commit ee97a204f2

View file

@ -146,9 +146,10 @@ Actors::updateObjectCell(const MWWorld::Ptr &ptr)
node = mCellSceneNodes[newCell];
}
node->addChild(ptr.getRefData().getBaseNode());
if (Animation *anim = mAllActors[ptr]) {
if (mAllActors.find(ptr) != mAllActors.end()) {
/// \note Update key (Ptr's are compared only with refdata so mCell
/// on key is outdated), maybe redundant
Animation *anim = mAllActors[ptr];
mAllActors.erase(ptr);
mAllActors[ptr] = anim;
}