Fix float options not loading properly when , used for decimal point

This commit is contained in:
UnknownShadow200 2017-02-10 22:32:13 +11:00
parent 5c03fc8009
commit 8f8e880d94

View file

@ -100,7 +100,7 @@ namespace ClassicalSharp {
public static float GetFloat(string key, float min, float max, float defValue) {
string value;
float valueFloat = 0;
if (!TryGetValue(key, out value) || !Single.TryParse(value, out valueFloat))
if (!TryGetValue(key, out value) || !Utils.TryParseDecimal(value, out valueFloat))
return defValue;
Utils.Clamp(ref valueFloat, min, max);
return valueFloat;