]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/checkbox.qc
Remove trailing 0s before saving float numbers into cvars in the menu. Reason: with...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / checkbox.qc
index 21743b9a1506801ea9a4a86bce1843c706d85447..6015e48bad45369c9b350e4eefe38d29202f2e8a 100644 (file)
@@ -77,9 +77,9 @@ void XonoticCheckBox_saveCvars(entity me)
                return;
 
        if(me.checked)
-               cvar_set(me.cvarName, ftos(me.yesValue));
+               cvar_set(me.cvarName, ftos_mindecimals(me.yesValue));
        else
-               cvar_set(me.cvarName, ftos(me.noValue));
+               cvar_set(me.cvarName, ftos_mindecimals(me.noValue));
 
        CheckSendCvars(me, me.cvarName);
 }