mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 09:23:53 +00:00
Merge pull request #1003 from MiroslavR/camera-distance
Fix camera distance not getting reset to max value (Fixes #3473)
This commit is contained in:
commit
9e3ed45320
2 changed files with 4 additions and 12 deletions
|
@ -54,7 +54,6 @@ namespace MWRender
|
|||
mIsNearest(false),
|
||||
mHeight(124.f),
|
||||
mMaxCameraDistance(192.f),
|
||||
mDistanceAdjusted(false),
|
||||
mVanityToggleQueued(false),
|
||||
mVanityToggleQueuedValue(false),
|
||||
mViewModeToggleQueued(false),
|
||||
|
@ -342,22 +341,17 @@ namespace MWRender
|
|||
} else if (!mFirstPersonView) {
|
||||
mMaxCameraDistance = mCameraDistance;
|
||||
}
|
||||
} else {
|
||||
mDistanceAdjusted = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Camera::setCameraDistance()
|
||||
{
|
||||
if (mDistanceAdjusted) {
|
||||
if (mVanity.enabled || mPreviewMode) {
|
||||
mCameraDistance = mPreviewCam.offset;
|
||||
} else if (!mFirstPersonView) {
|
||||
mCameraDistance = mMaxCameraDistance;
|
||||
}
|
||||
}
|
||||
mDistanceAdjusted = false;
|
||||
}
|
||||
|
||||
void Camera::setAnimation(NpcAnimation *anim)
|
||||
{
|
||||
|
|
|
@ -49,8 +49,6 @@ namespace MWRender
|
|||
float mHeight, mMaxCameraDistance;
|
||||
CamData mMainCam, mPreviewCam;
|
||||
|
||||
bool mDistanceAdjusted;
|
||||
|
||||
bool mVanityToggleQueued;
|
||||
bool mVanityToggleQueuedValue;
|
||||
bool mViewModeToggleQueued;
|
||||
|
|
Loading…
Reference in a new issue