Open ecsr opened 2 years ago
Looks like an issue from Valve.
The value is converted from string to float, then float to int. The issue is that "35781985" is not exactly representable in floating-point (See https://www.h-schmidt.net/FloatConverter/IEEE754.html), so "35781985" is converted to 35781984.0, then 35781984.
=> Solution: Ask Valve to convert the string to int directly :D
Help us help you
Environment
Description
ConVar.IntValue returns the wrong value for larger odd numbers. I'm only able to reproduce this on Linux; on Windows everything is working as expected. There is an old issue (#648) from 2017 that reported the same problem but for CS:GO.
Problematic Code (or Steps to Reproduce)
Logs
game output: