1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +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:
scrawl 2016-07-17 20:24:49 +02:00 committed by GitHub
commit 9e3ed45320
2 changed files with 4 additions and 12 deletions

View File

@ -54,7 +54,6 @@ namespace MWRender
mIsNearest(false), mIsNearest(false),
mHeight(124.f), mHeight(124.f),
mMaxCameraDistance(192.f), mMaxCameraDistance(192.f),
mDistanceAdjusted(false),
mVanityToggleQueued(false), mVanityToggleQueued(false),
mVanityToggleQueuedValue(false), mVanityToggleQueuedValue(false),
mViewModeToggleQueued(false), mViewModeToggleQueued(false),
@ -342,21 +341,16 @@ namespace MWRender
} else if (!mFirstPersonView) { } else if (!mFirstPersonView) {
mMaxCameraDistance = mCameraDistance; mMaxCameraDistance = mCameraDistance;
} }
} else {
mDistanceAdjusted = true;
} }
} }
void Camera::setCameraDistance() void Camera::setCameraDistance()
{ {
if (mDistanceAdjusted) { if (mVanity.enabled || mPreviewMode) {
if (mVanity.enabled || mPreviewMode) { mCameraDistance = mPreviewCam.offset;
mCameraDistance = mPreviewCam.offset; } else if (!mFirstPersonView) {
} else if (!mFirstPersonView) { mCameraDistance = mMaxCameraDistance;
mCameraDistance = mMaxCameraDistance;
}
} }
mDistanceAdjusted = false;
} }
void Camera::setAnimation(NpcAnimation *anim) void Camera::setAnimation(NpcAnimation *anim)

View File

@ -49,8 +49,6 @@ namespace MWRender
float mHeight, mMaxCameraDistance; float mHeight, mMaxCameraDistance;
CamData mMainCam, mPreviewCam; CamData mMainCam, mPreviewCam;
bool mDistanceAdjusted;
bool mVanityToggleQueued; bool mVanityToggleQueued;
bool mVanityToggleQueuedValue; bool mVanityToggleQueuedValue;
bool mViewModeToggleQueued; bool mViewModeToggleQueued;