Fix sqr distance overflowing over 32

This commit is contained in:
Louvenarde 2024-01-13 19:09:43 +01:00
parent afb9e5da47
commit fea8a51abb

View File

@ -382,7 +382,7 @@ namespace Components
auto world = gfxAsset->asset.header.gfxWorld; auto world = gfxAsset->asset.header.gfxWorld;
auto drawDistance = r_playerDrawDebugDistance.get<int>(); auto drawDistance = r_playerDrawDebugDistance.get<int>();
auto sqrDist = drawDistance * drawDistance; auto sqrDist = drawDistance * static_cast<float>(drawDistance);
switch (val) switch (val)
{ {