mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Avoid calling setVisible for character previews
This commit is contained in:
parent
9f9d978b0f
commit
029d565727
@ -62,8 +62,6 @@ namespace MWRender
|
|||||||
mAnimation = new NpcAnimation(mCharacter, mNode, MWWorld::Class::get(mCharacter).getInventoryStore(mCharacter),
|
mAnimation = new NpcAnimation(mCharacter, mNode, MWWorld::Class::get(mCharacter).getInventoryStore(mCharacter),
|
||||||
0, (renderHeadOnly() ? NpcAnimation::VM_HeadOnly : NpcAnimation::VM_Normal));
|
0, (renderHeadOnly() ? NpcAnimation::VM_HeadOnly : NpcAnimation::VM_Normal));
|
||||||
|
|
||||||
mNode->setVisible (false);
|
|
||||||
|
|
||||||
Ogre::Vector3 scale = mNode->getScale();
|
Ogre::Vector3 scale = mNode->getScale();
|
||||||
mCamera->setPosition(mPosition * scale);
|
mCamera->setPosition(mPosition * scale);
|
||||||
mCamera->lookAt(mLookAt * scale);
|
mCamera->lookAt(mLookAt * scale);
|
||||||
@ -108,8 +106,6 @@ namespace MWRender
|
|||||||
MWWorld::Class::get(mCharacter).adjustScale(mCharacter, scale);
|
MWWorld::Class::get(mCharacter).adjustScale(mCharacter, scale);
|
||||||
mNode->setScale(Ogre::Vector3(scale));
|
mNode->setScale(Ogre::Vector3(scale));
|
||||||
|
|
||||||
mNode->setVisible (false);
|
|
||||||
|
|
||||||
mCamera->setPosition(mPosition * mNode->getScale());
|
mCamera->setPosition(mPosition * mNode->getScale());
|
||||||
mCamera->lookAt(mLookAt * mNode->getScale());
|
mCamera->lookAt(mLookAt * mNode->getScale());
|
||||||
|
|
||||||
@ -139,12 +135,8 @@ namespace MWRender
|
|||||||
|
|
||||||
mNode->setOrientation (Ogre::Quaternion::IDENTITY);
|
mNode->setOrientation (Ogre::Quaternion::IDENTITY);
|
||||||
|
|
||||||
mNode->setVisible (true);
|
|
||||||
|
|
||||||
mRenderTarget->update();
|
mRenderTarget->update();
|
||||||
mSelectionBuffer->update();
|
mSelectionBuffer->update();
|
||||||
|
|
||||||
mNode->setVisible (false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int InventoryPreview::getSlotSelected (int posX, int posY)
|
int InventoryPreview::getSlotSelected (int posX, int posY)
|
||||||
@ -178,9 +170,7 @@ namespace MWRender
|
|||||||
|
|
||||||
updateCamera();
|
updateCamera();
|
||||||
|
|
||||||
mNode->setVisible (true);
|
|
||||||
mRenderTarget->update();
|
mRenderTarget->update();
|
||||||
mNode->setVisible (false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RaceSelectionPreview::setPrototype(const ESM::NPC &proto)
|
void RaceSelectionPreview::setPrototype(const ESM::NPC &proto)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user