Skip to content

Commit

Permalink
Fix sqr distance overflowing over 32
Browse files Browse the repository at this point in the history
  • Loading branch information
Louvenarde committed Jan 13, 2024
1 parent afb9e5d commit fea8a51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Components/Modules/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ namespace Components
auto world = gfxAsset->asset.header.gfxWorld;

auto drawDistance = r_playerDrawDebugDistance.get<int>();
auto sqrDist = drawDistance * drawDistance;
auto sqrDist = drawDistance * static_cast<float>(drawDistance);

switch (val)
{
Expand Down

0 comments on commit fea8a51

Please sign in to comment.