]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Possible fix for buff random selection
authorMario <mario@smbclan.net>
Sun, 12 Mar 2017 22:04:58 +0000 (08:04 +1000)
committerMario <mario@smbclan.net>
Sun, 12 Mar 2017 22:04:58 +0000 (08:04 +1000)
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc

index 7048e541f4d3397a104afba7b3ea0342d669883b..f6fedde848da86d91c7105052c0da1d44cafe630 100644 (file)
@@ -220,7 +220,7 @@ void buff_NewType(entity ent)
        FOREACH(Buffs, buff_Available(it),
        {
                // if it's already been chosen, give it a lower priority
-               RandomSelection_AddEnt(it, 1, max(0.2, 1 / it.buff_seencount));
+               RandomSelection_AddEnt(it, max(0.2, 1 / it.buff_seencount), 1);
        });
        entity newbuff = RandomSelection_chosen_ent;
        newbuff.buff_seencount += 1; // lower chances of seeing this buff again soon