]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/bool.qh
Some minor changes to support movetype prediction
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / bool.qh
index 34e8bfc66999b66968cc4b08e8de1b283167dbea..5510c171cfcc357487f4cd92182e8b987f88d7ea 100644 (file)
@@ -11,6 +11,8 @@
 [[deprecated("use true")]][[alias("true")]] const bool TRUE;
 [[deprecated("use false")]][[alias("false")]] const bool FALSE;
 
+#define boolean(value) ((value) != 0)
+
 // get true/false value of a string with multiple different inputs
 float InterpretBoolean(string input)
 {
@@ -26,10 +28,8 @@ float InterpretBoolean(string input)
                case "off":
                        return false;
 
-               default: return stof(input);
+               default: return boolean(stof(input));
        }
 }
 
-#define boolean(value) ((value) != 0)
-
 #endif