#include <common/constants.qh>
#include <common/util.qh>
#include <common/items/item.qh>
-#include <common/weapons/all.qh>
+#include <common/weapons/_all.qh>
#include <common/state.qh>
#include <common/mutators/mutator/waypoints/waypointsprites.qh>
void Weapon_whereis(Weapon this, entity cl)
{
if (!autocvar_g_showweaponspawns) return;
- FOREACH_ENTITY_FLOAT(weapon, this.m_id,
+ IL_EACH(g_items, it.weapon == this.m_id,
{
if (it.classname == "droppedweapon" && autocvar_g_showweaponspawns < 2)
continue;
- if (!(it.flags & FL_ITEM))
- continue;
entity wp = WaypointSprite_Spawn(
WP_Weapon,
-2, 0,
}
else if(!forbidWeaponUse(this)) {
entity actor = this;
- .entity weaponentity = weaponentities[0]; // TODO: unhardcode
- w.wr_reload(w, actor, weaponentity);
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ .entity weaponentity = weaponentities[slot];
+ w.wr_reload(w, actor, weaponentity);
+ }
}
}