]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Small cleanups
authorterencehill <piuntn@gmail.com>
Fri, 6 Apr 2018 11:34:18 +0000 (13:34 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 6 Apr 2018 11:34:18 +0000 (13:34 +0200)
qcsrc/menu/xonotic/weaponarenacheckbox.qc
qcsrc/server/command/cmd.qc

index fd4f51385bb898cf74fd498b1bc13b3673c02805..695b2d7873144974af98443e14ca3f36dd680141 100644 (file)
@@ -21,9 +21,8 @@ void XonoticWeaponarenaCheckBox_setChecked(entity me, float foo)
 }
 void XonoticWeaponarenaCheckBox_loadCvars(entity me)
 {
-       float n = tokenize_console(cvar_string("menu_weaponarena"));
-       float i;
-       for(i=0; i<n; ++i)
+       int n = tokenize_console(cvar_string("menu_weaponarena"));
+       for (int i = 0; i < n; i++)
        {
                if(argv(i) == me.netname)
                {
index 088925f100f2f3f47499a4be5a72bcac7861bf15..47e94f52034bf8b1a0255c8ca76b419d9772d891 100644 (file)
@@ -614,8 +614,10 @@ void ClientCommand_voice(entity caller, float request, float argc, string comman
                                        sprint(caller, sprintf("Invalid voice. Use one of: %s\n", allvoicesamples));
                                        return;
                                }
-                               if (argc >= 3) VoiceMessage(caller, e, substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
-                               else VoiceMessage(caller, e, "");
+                               string msg = "";
+                               if (argc >= 3)
+                                       msg = substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2));
+                               VoiceMessage(caller, e, msg);
 
                                return;
                        }