if(this.move_flags & FL_ONGROUND)
this.gravity = 0;
}
+
+ Item_SetAlpha(this);
}
void Item_PreDraw()
if(warpzone_warpzones_exist)
{
// just incase warpzones were initialized last, reset these
- self.alpha = 1;
+ //self.alpha = 1; // alpha is already set by the draw function
self.drawmask = MASK_NORMAL;
return;
}
self.drawmask = MASK_NORMAL;
}
-void ItemRemove()
-{SELFPARAM();
- if (self.mdl)
- strunzone(self.mdl);
+void ItemRemove(entity this)
+{
+ if(this.mdl)
+ strunzone(this.mdl);
}
NET_HANDLE(ENT_CLIENT_ITEM, bool isnew)
}
if(!(other.flags & FL_PICKUPITEMS)
- || other.frozen
- || other.deadflag
+ || STAT(FROZEN, other)
+ || IS_DEAD(other)
|| (this.solid != SOLID_TRIGGER)
|| (this.owner == other)
|| (time < this.item_spawnshieldtime)
return item.bot_pickupbasevalue * c;
}
-void Item_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void Item_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
if(ITEM_DAMAGE_NEEDKILL(deathtype))
- RemoveItem();
+ WITH(entity, self, this, RemoveItem());
}
void _StartItem(entity this, entity def, float defaultrespawntime, float defaultrespawntimejitter)
return;
EXACTTRIGGER_TOUCH;
- entity e;
- for(e = world; (e = find(e, classname, "droppedweapon")); )
- if(e.enemy == activator)
- remove(e);
+ FOREACH_ENTITY_ENT(enemy, activator,
+ {
+ if(it.classname == "droppedweapon")
+ remove(it);
+ });
if(GiveItems(activator, 0, tokenize_console(self.netname)))
centerprint(activator, self.message);