Skip to content

Commit

Permalink
Fix sky being distorted by zoom effect
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlaux committed May 14, 2024
1 parent 5121966 commit e332f25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@

## Bug Fixes

- **Sky being distorted by zoom effect**
- **_Show Stats/Time_ toggle affecting Automap instead of HUD when on Minimap**
- **_Cycle Chasecam_ and _Toggle Crosshair_ inputs eating inputs**
5 changes: 3 additions & 2 deletions src/r_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,13 +824,14 @@ void R_ExecuteSetViewSize (void)
while (FixedMul(pspriteiscale, pspritescale) < FRACUNIT)
pspriteiscale++;

if (custom_fov == FOV_DEFAULT)
// [Nugget] Use `r_fov` instead of `custom_fov`
if (r_fov == FOV_DEFAULT)
{
skyiscale = FixedDiv(SCREENWIDTH, viewwidth_nonwide);
}
else
{
skyiscale = tan(custom_fov * M_PI / 360.0) * SCREENWIDTH / viewwidth_nonwide * FRACUNIT;
skyiscale = tan(r_fov * M_PI / 360.0) * SCREENWIDTH / viewwidth_nonwide * FRACUNIT;
}

for (i=0 ; i<viewwidth ; i++)
Expand Down

0 comments on commit e332f25

Please sign in to comment.