Skip to content

Commit

Permalink
- fixed screen job fadeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Apr 16, 2021
1 parent 091a9b7 commit 962e313
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/core/screenjob.cpp
Expand Up @@ -202,7 +202,7 @@ class ScreenJobRunner
int FadeoutFrame(double smoothratio)
{
auto& job = jobs[index];
double ms = (job.job->ticks + smoothratio) * 1000 / GameTicRate / job.job->fadetime;
double ms = (fadeticks + smoothratio) * 1000 / GameTicRate / job.job->fadetime;
float screenfade = 1.f - (float)clamp(ms, 0., 1.);
twod->SetScreenFade(screenfade);
job.job->DrawFrame(1.);
Expand Down Expand Up @@ -292,6 +292,7 @@ class ScreenJobRunner
jobs[index].job->fadestate = DScreenJob::fadeout;
jobs[index].job->state = DScreenJob::stopping;
actionState = State_Fadeout;
fadeticks = 0;
}
else
{
Expand Down

0 comments on commit 962e313

Please sign in to comment.