diff --git a/mp/src/game/client/neo/ui/neo_ui.cpp b/mp/src/game/client/neo/ui/neo_ui.cpp index 4a408eb73..6eedb7d3e 100644 --- a/mp/src/game/client/neo/ui/neo_ui.cpp +++ b/mp/src/game/client/neo/ui/neo_ui.cpp @@ -845,9 +845,13 @@ void Slider(const wchar_t *wszLeftLabel, float *flValue, const float flMin, cons void SliderInt(const wchar_t *wszLeftLabel, int *iValue, const int iMin, const int iMax, const int iStep, const wchar_t *wszSpecialText) { - float flValue = *iValue; + const float flOrigValue = *iValue; + float flValue = flOrigValue; Slider(wszLeftLabel, &flValue, static_cast(iMin), static_cast(iMax), 0, static_cast(iStep), wszSpecialText); - *iValue = static_cast(flValue); + if (flValue != flOrigValue) + { + *iValue = RoundFloatToInt(flValue); + } } void TextEdit(const wchar_t *wszLeftLabel, wchar_t *wszText, const int iMaxSize)