]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
refactor RandomSelection, add a field for vector
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / buffs / sv_buffs.qc
index 82fa2d33cb8bd0e0a649619e7836f95eefdfd9d6..5587da593796e32e6e6afee3d91d84ec4ac14a18 100644 (file)
@@ -216,7 +216,7 @@ void buff_NewType(entity ent, float cb)
        FOREACH(Buffs, buff_Available(it), LAMBDA(
                it.buff_seencount += 1;
                // if it's already been chosen, give it a lower priority
-               RandomSelection_Add(NULL, it.m_itemid, string_null, 1, max(0.2, 1 / it.buff_seencount));
+               RandomSelection_AddFloat(it.m_itemid, 1, max(0.2, 1 / it.buff_seencount));
        ));
        ent.buffs = RandomSelection_chosen_float;
 }