Fix queueing of vanity mode toggle (Bug #3421)

coverity_scan^2
scrawl 9 years ago
parent ce91637cf9
commit c47a679ac9

@ -56,6 +56,7 @@ namespace MWRender
mMaxCameraDistance(192.f),
mDistanceAdjusted(false),
mVanityToggleQueued(false),
mVanityToggleQueuedValue(false),
mViewModeToggleQueued(false),
mCameraDistance(0.f)
{
@ -150,7 +151,7 @@ namespace MWRender
// Now process the view changes we queued earlier
if (mVanityToggleQueued)
{
toggleVanityMode(!mVanity.enabled);
toggleVanityMode(mVanityToggleQueuedValue);
mVanityToggleQueued = false;
}
if (mViewModeToggleQueued)
@ -205,6 +206,7 @@ namespace MWRender
if (isFirstPerson() && !mAnimation->upperBodyReady())
{
mVanityToggleQueued = true;
mVanityToggleQueuedValue = enable;
return false;
}

@ -52,6 +52,7 @@ namespace MWRender
bool mDistanceAdjusted;
bool mVanityToggleQueued;
bool mVanityToggleQueuedValue;
bool mViewModeToggleQueued;
float mCameraDistance;

Loading…
Cancel
Save