#include "t_items.qh"
-#include "items/all.qc"
+#include "items/_mod.qh"
#if defined(SVQC)
#include "../server/bot/api.qh"
- #include <server/mutators/all.qh>
+ #include <server/mutators/_mod.qh>
#include "../server/weapons/common.qh"
#include "../server/weapons/selection.qh"
#include "triggers/subs.qh"
#include "util.qh"
- #include <common/monsters/all.qh>
+ #include <common/monsters/_mod.qh>
- #include <common/weapons/all.qh>
+ #include <common/weapons/_all.qh>
#include "../lib/warpzone/util_server.qh"
#elif defined(CSQC)
#include "physics/movetypes/movetypes.qh"
- #include <common/weapons/all.qh>
+ #include <common/weapons/_all.qh>
#include "../lib/csqcmodel/cl_model.qh"
#include "../lib/csqcmodel/common.qh"
#endif
if(this.team)
{
RandomSelection_Init();
- FOREACH_ENTITY_FLAGS(flags, FL_ITEM,
+ IL_EACH(g_items, it.team == this.team,
{
- if(it.team == this.team)
- if(it.classname != "item_flag_team" && it.classname != "item_key_team")
+ if(it.classname != "item_flag_team" && it.classname != "item_kh_key")
{
Item_Show(it, -1);
- RandomSelection_Add(it, 0, string_null, it.cnt, 0);
+ RandomSelection_AddEnt(it, it.cnt, 0);
}
});
e = RandomSelection_chosen_ent;
// marker for item team search
LOG_TRACE("Initializing item team ", ftos(this.team));
RandomSelection_Init();
- FOREACH_ENTITY_FLOAT(team, this.team,
+ IL_EACH(g_items, it.team == this.team,
{
- if(it.flags & FL_ITEM)
- if(it.classname != "item_flag_team" && it.classname != "item_key_team")
- RandomSelection_Add(it, 0, string_null, it.cnt, 0);
+ if(it.classname != "item_flag_team" && it.classname != "item_kh_key")
+ RandomSelection_AddEnt(it, it.cnt, 0);
});
e = RandomSelection_chosen_ent;
e.state = 0;
Item_Show(e, 1);
- FOREACH_ENTITY_FLOAT(team, this.team,
+ IL_EACH(g_items, it.team == this.team,
{
- if(it.flags & FL_ITEM)
- if(it.classname != "item_flag_team" && it.classname != "item_key_team")
+ if(it.classname != "item_flag_team" && it.classname != "item_kh_key")
{
if(it != e)
{
this.weapons = WepSet_FromWeapon(Weapons_from(weaponid));
this.flags = FL_ITEM | itemflags;
+ IL_PUSH(g_items, this);
if(MUTATOR_CALLHOOK(FilterItem, this)) // error means we do not want the item
{
EXACTTRIGGER_TOUCH(this, trigger);
}
- FOREACH_ENTITY_ENT(enemy, actor,
+ IL_EACH(g_items, it.enemy == actor && it.classname == "droppedweapon",
{
- if(it.classname == "droppedweapon")
- delete(it);
+ delete(it);
});
if(GiveItems(actor, 0, tokenize_console(this.netname)))