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)
|| STAT(FROZEN, other)
- || other.deadflag
+ || 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)