void RenderingManager::rebuildPtr(const MWWorld::Ptr &ptr) { NpcAnimation *anim = NULL; if(ptr.getRefData().getHandle() == "player") anim = mPlayerAnimation; else if(ptr.getClass().isActor()) anim = dynamic_cast<NpcAnimation*>(mActors->getAnimation(ptr)); if(anim) { anim->rebuild(); if(mCamera->getHandle() == ptr.getRefData().getHandle()) { attachCameraTo(ptr); mCamera->setAnimation(anim); } } }
void RenderingManager::rebuildPtr(const MWWorld::Ptr &ptr) { NpcAnimation *anim = NULL; if(ptr == mPlayerAnimation->getPtr()) anim = mPlayerAnimation.get(); else anim = dynamic_cast<NpcAnimation*>(mObjects->getAnimation(ptr)); if(anim) { anim->rebuild(); if(mCamera->getTrackingPtr() == ptr) { mCamera->attachTo(ptr); mCamera->setAnimation(anim); } } }