]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
More InterpretBoolean use
authorSamual <samual@xonotic.org>
Mon, 19 Dec 2011 18:24:09 +0000 (13:24 -0500)
committerSamual <samual@xonotic.org>
Mon, 19 Dec 2011 18:24:09 +0000 (13:24 -0500)
qcsrc/server/command/cmd.qc

index 908d0190542d5852d9e2b67fc7ecc86c457149b3..8e20fac5b6154a71a57335d869198c25ee8f1ce7 100644 (file)
@@ -32,7 +32,7 @@ void ClientCommand_autoswitch(float request, float argc)
        {
                case CMD_REQUEST_COMMAND:
                {
-                       self.autoswitch = ("0" != argv(1));
+                       self.autoswitch = InterpretBoolean(argv(1));
                        sprint(self, strcat("^1autoswitch is currently turned ", (self.autoswitch ? "on" : "off"), ".\n"));
                        return; // never fall through to usage
                }
@@ -41,7 +41,7 @@ void ClientCommand_autoswitch(float request, float argc)
                case CMD_REQUEST_USAGE:
                {
                        sprint(self, "\nUsage:^3 cmd autoswitch selection\n");
-                       sprint(self, "  Where 'selection' is 1 or 0 for on or off.\n"); 
+                       sprint(self, "  Where 'selection' controls if autoswitch is on or off.\n"); 
                        return;
                }
        }