#include "sv_buffs.qh"
#include <common/triggers/target/music.qh>
-#include <common/gamemodes/_all.qh>
+#include <common/gamemodes/_mod.qh>
.float buff_time = _STAT(BUFF_TIME);
void buffs_DelayedInit(entity this);
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;
}
this.classname = "item_buff";
this.solid = SOLID_TRIGGER;
this.flags = FL_ITEM;
+ this.bot_pickup = true;
+ this.bot_pickupevalfunc = commodity_pickupevalfunc;
+ this.bot_pickupbasevalue = 1000;
+ IL_PUSH(g_items, this);
setthink(this, buff_Think);
settouch(this, buff_Touch);
this.reset = buff_Reset;
});
}
-float buff_Inferno_CalculateTime(float x, float offset_x, float offset_y, float intersect_x, float intersect_y, float base)
+float buff_Inferno_CalculateTime(float damg, float offset_x, float offset_y, float intersect_x, float intersect_y, float base)
{
- return offset_y + (intersect_y - offset_y) * logn(((x - offset_x) * ((base - 1) / intersect_x)) + 1, base);
+ return offset_y + (intersect_y - offset_y) * logn(((damg - offset_x) * ((base - 1) / intersect_x)) + 1, base);
}
// mutator hooks
if(player.buffs & BUFF_MAGNET.m_itemid)
{
vector pickup_size;
- FOREACH_ENTITY_FLAGS(flags, FL_ITEM,
+ IL_EACH(g_items, it.itemdef,
{
if(it.buffs)
pickup_size = '1 1 1' * autocvar_g_buffs_magnet_range_buff;