From: Amadeusz Sławiński Date: Wed, 22 Feb 2017 13:41:56 +0000 (+0100) Subject: reduce variable scope X-Git-Tag: xonotic-v0.8.5~2843^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a6c6b50c53115c3b4e001f178366b2029b0ccb89;p=xonotic%2Fxonotic-data.pk3dir.git reduce variable scope --- diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index e5c6218b12..ffaa59fd0f 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -1480,7 +1480,7 @@ void target_items_use(entity this, entity actor, entity trigger) spawnfunc(target_items) { - int n, j; + int n; string s; this.use = target_items_use; @@ -1498,7 +1498,7 @@ spawnfunc(target_items) } else { - for(j = 0; j < n; ++j) + for(int j = 0; j < n; ++j) { if (argv(j) == "unlimited_ammo") this.items |= IT_UNLIMITED_AMMO; else if(argv(j) == "unlimited_weapon_ammo") this.items |= IT_UNLIMITED_WEAPON_AMMO; @@ -1582,7 +1582,7 @@ spawnfunc(target_items) //print(this.netname, "\n"); n = tokenize_console(this.netname); - for(j = 0; j < n; ++j) + for(int j = 0; j < n; ++j) { FOREACH(Weapons, it != WEP_Null && W_UndeprecateName(argv(j)) == it.netname, { it.wr_init(it);