void Activators::updateActivator(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr) { PtrControllerMap::iterator iter = mActivators.find(old); if(iter != mActivators.end()) { CharacterController ctrl = iter->second; mActivators.erase(iter); ctrl.updatePtr(ptr); mActivators.insert(std::make_pair(ptr, ctrl)); } }
void Objects::updateObject(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr) { PtrControllerMap::iterator iter = mObjects.find(old); if(iter != mObjects.end()) { CharacterController *ctrl = iter->second; mObjects.erase(iter); ctrl->updatePtr(ptr); mObjects.insert(std::make_pair(ptr, ctrl)); } }