From: Mario Date: Wed, 5 Aug 2015 12:56:12 +0000 (+1000) Subject: Add a limit to prevent ultra rare buffs X-Git-Tag: xonotic-v0.8.1~18^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bb027873f75ffe803edd789d4d94d4772316b914;p=xonotic%2Fxonotic-data.pk3dir.git Add a limit to prevent ultra rare buffs --- diff --git a/qcsrc/server/mutators/mutator_buffs.qc b/qcsrc/server/mutators/mutator_buffs.qc index 165f67706..3debf921c 100644 --- a/qcsrc/server/mutators/mutator_buffs.qc +++ b/qcsrc/server/mutators/mutator_buffs.qc @@ -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;