From: Lyberta Date: Mon, 16 Oct 2017 10:05:40 +0000 (+0300) Subject: Random items: Better weapon replacement code. X-Git-Tag: xonotic-v0.8.5~2426^2~21 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=05d8d41096560cbc497a3b6228f13687ab4f7504;p=xonotic%2Fxonotic-data.pk3dir.git Random items: Better weapon replacement code. --- diff --git a/qcsrc/common/mutators/mutator/random_items/sv_random_items.qc b/qcsrc/common/mutators/mutator/random_items/sv_random_items.qc index 2e976a8be..2df1fabfa 100644 --- a/qcsrc/common/mutators/mutator/random_items/sv_random_items.qc +++ b/qcsrc/common/mutators/mutator/random_items/sv_random_items.qc @@ -81,7 +81,7 @@ string RandomItems_GetItemVarName(string class_name) { if (startsWith(class_name, "weapon_")) { - FOREACH(Weapons, sprintf("weapon_%s", it.netname) == class_name, { + FOREACH(Weapons, it.m_canonical_spawnfunc == class_name, { if (it.spawnflags & WEP_FLAG_MUTATORBLOCKED) { return "";