Fix sky texture scaling wrong with fov changes

This commit is contained in:
fickleheart 2020-01-17 22:03:16 -06:00
parent 7bd9344dd0
commit 21ccefe4eb
2 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@ extern INT32 centerx, centery;
extern fixed_t centerxfrac, centeryfrac;
extern fixed_t projection, projectiony;
extern fixed_t fovtan; // field of view
extern size_t validcount, linecount, loopcount, framecount;

View File

@ -76,5 +76,5 @@ void R_SetupSkyDraw(void)
void R_SetSkyScale(void)
{
fixed_t difference = vid.fdupx-(vid.dupx<<FRACBITS);
skyscale = FixedDiv(FRACUNIT, vid.fdupx+difference);
skyscale = FixedDiv(fovtan, vid.fdupx+difference);
}