mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
fix linearsky calculation for large sky texture width (#2160)
This commit is contained in:
parent
4ebaddec41
commit
344d86d61b
@ -367,10 +367,7 @@ static void R_InitTextureMapping(void)
|
|||||||
xtoviewangle[x] = (i<<ANGLETOFINESHIFT)-ANG90;
|
xtoviewangle[x] = (i<<ANGLETOFINESHIFT)-ANG90;
|
||||||
// [FG] linear horizontal sky scrolling
|
// [FG] linear horizontal sky scrolling
|
||||||
int angle = (0.5 - x / (double)viewwidth) * linearskyfactor;
|
int angle = (0.5 - x / (double)viewwidth) * linearskyfactor;
|
||||||
if (angle >= 0)
|
linearskyangle[x] = (angle >= 0) ? angle : ANGLE_MAX + angle;
|
||||||
linearskyangle[x] = angle;
|
|
||||||
else
|
|
||||||
linearskyangle[x] = ANG90 + angle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Take out the fencepost cases from viewangletox.
|
// Take out the fencepost cases from viewangletox.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user