mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 09:11:35 +00:00
fix equipment visibility update
This commit is contained in:
parent
1c5055c8ac
commit
e9b2f4ee74
1 changed files with 5 additions and 6 deletions
|
@ -123,6 +123,11 @@ namespace MWRender
|
||||||
if (mAnimation) {
|
if (mAnimation) {
|
||||||
mAnimation->runAnimation(duration);
|
mAnimation->runAnimation(duration);
|
||||||
}
|
}
|
||||||
|
mPlayerNode->setVisible(
|
||||||
|
mVanity.enabled || mPreviewMode || !mFirstPersonView,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
if (mFirstPersonView && !mVanity.enabled) {
|
if (mFirstPersonView && !mVanity.enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -143,7 +148,6 @@ namespace MWRender
|
||||||
mCamera->setPosition(0.f, 0.f, mCameraDistance);
|
mCamera->setPosition(0.f, 0.f, mCameraDistance);
|
||||||
setLowHeight(true);
|
setLowHeight(true);
|
||||||
}
|
}
|
||||||
mPlayerNode->setVisible(!mFirstPersonView, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::allowVanityMode(bool allow)
|
void Player::allowVanityMode(bool allow)
|
||||||
|
@ -172,13 +176,11 @@ namespace MWRender
|
||||||
rot.x = Ogre::Degree(-30.f).valueRadians();
|
rot.x = Ogre::Degree(-30.f).valueRadians();
|
||||||
mMainCam.offset = mCamera->getPosition().z;
|
mMainCam.offset = mCamera->getPosition().z;
|
||||||
|
|
||||||
mPlayerNode->setVisible(true, false);
|
|
||||||
setLowHeight(true);
|
setLowHeight(true);
|
||||||
} else {
|
} else {
|
||||||
rot.x = getPitch();
|
rot.x = getPitch();
|
||||||
offset = mMainCam.offset;
|
offset = mMainCam.offset;
|
||||||
|
|
||||||
mPlayerNode->setVisible(!mFirstPersonView, false);
|
|
||||||
setLowHeight(!mFirstPersonView);
|
setLowHeight(!mFirstPersonView);
|
||||||
}
|
}
|
||||||
rot.z = getYaw();
|
rot.z = getYaw();
|
||||||
|
@ -199,13 +201,11 @@ namespace MWRender
|
||||||
mMainCam.offset = offset;
|
mMainCam.offset = offset;
|
||||||
offset = mPreviewCam.offset;
|
offset = mPreviewCam.offset;
|
||||||
|
|
||||||
mPlayerNode->setVisible(true, false);
|
|
||||||
setLowHeight(true);
|
setLowHeight(true);
|
||||||
} else {
|
} else {
|
||||||
mPreviewCam.offset = offset;
|
mPreviewCam.offset = offset;
|
||||||
offset = mMainCam.offset;
|
offset = mMainCam.offset;
|
||||||
|
|
||||||
mPlayerNode->setVisible(!mFirstPersonView, false);
|
|
||||||
setLowHeight(!mFirstPersonView);
|
setLowHeight(!mFirstPersonView);
|
||||||
}
|
}
|
||||||
mCamera->setPosition(0.f, 0.f, offset);
|
mCamera->setPosition(0.f, 0.f, offset);
|
||||||
|
@ -302,7 +302,6 @@ namespace MWRender
|
||||||
void Player::setAnimation(NpcAnimation *anim)
|
void Player::setAnimation(NpcAnimation *anim)
|
||||||
{
|
{
|
||||||
mAnimation = anim;
|
mAnimation = anim;
|
||||||
mPlayerNode->setVisible(!mFirstPersonView, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::setHeight(float height)
|
void Player::setHeight(float height)
|
||||||
|
|
Loading…
Reference in a new issue