mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
make the condition to start a new sequence less critical
In paticular, if less time than required for a full shading sequence has passed, don't start a new one. This allows to skip a gametic between two rendered frames, which apparently happens sometimes.
This commit is contained in:
parent
a63e16b14c
commit
b3ff45d15c
@ -862,12 +862,12 @@ void V_ShadeScreen(void)
|
||||
{
|
||||
int y;
|
||||
byte *dest = screens[0];
|
||||
const int targshade = 20;
|
||||
const int targshade = 20, step = 2;
|
||||
static int oldtic = -1;
|
||||
static int screenshade;
|
||||
|
||||
// [FG] more than one tic ago, start a new sequence
|
||||
if (gametic - oldtic > 1)
|
||||
// [FG] start a new sequence
|
||||
if (gametic - oldtic > targshade / step)
|
||||
{
|
||||
screenshade = 0;
|
||||
}
|
||||
@ -879,7 +879,7 @@ void V_ShadeScreen(void)
|
||||
|
||||
if (screenshade < targshade && gametic != oldtic)
|
||||
{
|
||||
screenshade += 2;
|
||||
screenshade += step;
|
||||
|
||||
if (screenshade > targshade)
|
||||
screenshade = targshade;
|
||||
|
Loading…
x
Reference in New Issue
Block a user