void Weapon_whereis(Weapon this, entity cl)
{
if (!autocvar_g_showweaponspawns) return;
- for (entity it = NULL; (it = findfloat(it, weapon, this.m_id)); )
+ FOREACH_ENTITY_FLOAT(weapon, this.m_id,
{
if (it.classname == "droppedweapon" && autocvar_g_showweaponspawns < 2)
continue;
RADARICON_NONE
);
wp.wp_extra = this.m_id;
- }
+ });
}
bool client_hasweapon(entity this, Weapon wpn, float andammo, bool complain)
}
else
{
- WITHSELF(this, f = wpn.wr_checkammo1(wpn) + wpn.wr_checkammo2(wpn));
+ f = wpn.wr_checkammo1(wpn, this) + wpn.wr_checkammo2(wpn, this);
// always allow selecting the Mine Layer if we placed mines, so that we can detonate them
if(wpn == WEP_MINE_LAYER)