1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-21 17:41:36 +00:00

Merge pull request #2411 from Capostrophic/fader

Make sure fade operations properly end (bug #4639)
This commit is contained in:
Andrei Kortunov 2019-06-10 08:58:26 +04:00 committed by GitHub
commit a62b6910ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -20,6 +20,7 @@
Bug #4384: Resist Normal Weapons only checks ammunition for ranged weapons Bug #4384: Resist Normal Weapons only checks ammunition for ranged weapons
Bug #4411: Reloading a saved game while falling prevents damage in some cases Bug #4411: Reloading a saved game while falling prevents damage in some cases
Bug #4540: Rain delay when exiting water Bug #4540: Rain delay when exiting water
Bug #4639: Black screen after completing first mages guild mission + training
Bug #4701: PrisonMarker record is not hardcoded like other markers Bug #4701: PrisonMarker record is not hardcoded like other markers
Bug #4703: Editor: it's possible to preview levelled list records Bug #4703: Editor: it's possible to preview levelled list records
Bug #4705: Editor: unable to open exterior cell views from Instances table Bug #4705: Editor: unable to open exterior cell views from Instances table

View file

@ -38,12 +38,20 @@ namespace MWGui
if (!mRunning) if (!mRunning)
return; return;
if (mRemainingTime <= 0 || mStartAlpha == mTargetAlpha) if (mStartAlpha == mTargetAlpha)
{ {
finish(); finish();
return; return;
} }
if (mRemainingTime <= 0)
{
// Make sure the target alpha is applied
mFader->notifyAlphaChanged(mTargetAlpha);
finish();
return;
}
if (mRemainingTime > mTargetTime) if (mRemainingTime > mTargetTime)
{ {
mRemainingTime -= dt; mRemainingTime -= dt;
@ -162,7 +170,7 @@ namespace MWGui
if (time < 0.f) if (time < 0.f)
return; return;
if (time == 0.f) if (time == 0.f && delay == 0.f)
{ {
mCurrentAlpha = targetAlpha; mCurrentAlpha = targetAlpha;
applyAlpha(); applyAlpha();