]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Random start weapons: Rename i and j.
authorLyberta <lyberta@lyberta.net>
Sat, 23 Sep 2017 07:02:40 +0000 (10:02 +0300)
committerLyberta <lyberta@lyberta.net>
Sat, 23 Sep 2017 07:02:40 +0000 (10:02 +0300)
qcsrc/common/t_items.qc

index 3874a427491924c4ac375d5a77feb43b2f118594..1a2e92c4ff4b146203198c698cea6ff48bd4b049 100644 (file)
@@ -690,12 +690,13 @@ void GiveRandomWeapons(entity receiver, int num_weapons, string weapon_names,
                return;
        }
        int num_potential_weapons = tokenize_console(weapon_names);
-       for (int i = 0; i < num_weapons; ++i)
+       for (int give_attempt = 0; give_attempt < num_weapons; ++give_attempt)
        {
                RandomSelection_Init();
-               for (int j = 0; j < num_potential_weapons; ++j)
+               for (int weapon_index = 0; weapon_index < num_potential_weapons;
+                       ++weapon_index)
                {
-                       string weapon = argv(j);
+                       string weapon = argv(weapon_index);
                        FOREACH(Weapons, it != WEP_Null,
                        {
                                // Finding a weapon which player doesn't have.