Skip to content

Fix calculation of apparent size#6872

Merged
BMagnu merged 1 commit into
scp-fs2open:masterfrom
BMagnu:fix_apparent_size_calc
Jul 26, 2025
Merged

Fix calculation of apparent size#6872
BMagnu merged 1 commit into
scp-fs2open:masterfrom
BMagnu:fix_apparent_size_calc

Conversation

@BMagnu

@BMagnu BMagnu commented Jul 25, 2025

Copy link
Copy Markdown
Member

This fixes two things:

  1. The general convert_distance_and_diameter_to_pixel_size function, which conflated horizontal fov with screen height and seemed to be missing a tan in the trigonometry (which I redid from scratch just to be safe).
  2. RandomRange reporting of the expected value when in constant value mode, which was what caused the radius of the muzzleflashes to be reported incorrectly to the scaling curves.

OVerall, this PR fixes the oversized muzzleflashes in exile.

@BMagnu BMagnu added this to the Release 25.0 milestone Jul 25, 2025
@BMagnu BMagnu added the fix A fix for bugs, not-a-bugs, and/or regressions. label Jul 25, 2025
@BMagnu BMagnu merged commit fcb257d into scp-fs2open:master Jul 26, 2025
20 checks passed
Kestrellius pushed a commit to Kestrellius/fs2open.github.com that referenced this pull request Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A fix for bugs, not-a-bugs, and/or regressions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants