Skip to content

Commit

Permalink
Doom: fix blinking of drawing Tower of Babel on intermission screen
Browse files Browse the repository at this point in the history
Fixes #122
  • Loading branch information
JNechaevsky committed Mar 7, 2024
1 parent 5485953 commit bac34d4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/doom/wi_stuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ WI_drawOnLnode



void WI_initAnimatedBack(void)
void WI_initAnimatedBack(boolean firstcall)
{
int i;
anim_t* a;
Expand All @@ -531,6 +531,9 @@ void WI_initAnimatedBack(void)
a = &anims[wbs->epsd][i];

// init variables
// [JN] Do not reset animation timers upon switching to "Entering" state
// (WI_initShowNextLoc). Fixes notable blinking of Tower of Babel drawing.
if (firstcall)
a->ctr = -1;

// specify the next time to draw it
Expand Down Expand Up @@ -795,7 +798,7 @@ void WI_initShowNextLoc(void)
acceleratestage = 0;
cnt = SHOWNEXTLOCDELAY * TICRATE;

WI_initAnimatedBack();
WI_initAnimatedBack(false);
}

void WI_updateShowNextLoc(void)
Expand Down Expand Up @@ -920,7 +923,7 @@ void WI_initDeathmatchStats(void)
}
}

WI_initAnimatedBack();
WI_initAnimatedBack(true);
}


Expand Down Expand Up @@ -1139,7 +1142,7 @@ void WI_initNetgameStats(void)

dofrags = !!dofrags;

WI_initAnimatedBack();
WI_initAnimatedBack(true);
}


Expand Down Expand Up @@ -1365,7 +1368,7 @@ void WI_initStats(void)
cnt_time = cnt_par = -1;
cnt_pause = TICRATE;

WI_initAnimatedBack();
WI_initAnimatedBack(true);
}

void WI_updateStats(void)
Expand Down

0 comments on commit bac34d4

Please sign in to comment.