From: Lyberta Date: Sat, 23 Sep 2017 07:02:40 +0000 (+0300) Subject: Random start weapons: Rename i and j. X-Git-Tag: xonotic-v0.8.5~2459^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0c512bc4a25acdf8adfc31c63b69e374baaa621b;p=xonotic%2Fxonotic-data.pk3dir.git Random start weapons: Rename i and j. --- diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 3874a4274..1a2e92c4f 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -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.