From ee97a204f2db3970358cd77667208dfcc72379f1 Mon Sep 17 00:00:00 2001 From: greye Date: Mon, 6 Aug 2012 15:26:37 +0400 Subject: [PATCH] fix npc animation key update --- apps/openmw/mwrender/actors.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/actors.cpp b/apps/openmw/mwrender/actors.cpp index a73244305..415d17241 100644 --- a/apps/openmw/mwrender/actors.cpp +++ b/apps/openmw/mwrender/actors.cpp @@ -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; }