]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a limit to prevent ultra rare buffs
authorMario <zacjardine@y7mail.com>
Wed, 5 Aug 2015 12:56:12 +0000 (22:56 +1000)
committerMario <zacjardine@y7mail.com>
Wed, 5 Aug 2015 12:56:12 +0000 (22:56 +1000)
qcsrc/server/mutators/mutator_buffs.qc

index 165f677064295b5d91aaf8a3ae6f77327fb172fe..3debf921c6bbb863ac4b56d4ae5c5b90b40982c1 100644 (file)
@@ -202,7 +202,7 @@ void buff_NewType(entity ent, float cb)
        for(e = Buff_Type_first; e; e = e.enemy)
        if(buff_Available(e.items))
        {
-               RandomSelection_Add(world, e.items, string_null, 1, 1 / e.count); // if it's already been chosen, give it a lower priority
+               RandomSelection_Add(world, e.items, string_null, 1, max(0.2, 1 / e.count)); // if it's already been chosen, give it a lower priority
                e.count += 1;
        }
        ent.buffs = RandomSelection_chosen_float;