]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/t_items.qc
Merge branch 'terencehill/hud_skin_updates' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / t_items.qc
index a381324f8990ea7613132f3086f2c9fbaaf9794f..85ba9f51b3471bac94a42f0d967f1dd7f2e7961b 100644 (file)
@@ -816,7 +816,7 @@ LABEL(pickup)
        other.last_pickup = time;
 
        Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1);
-       _sound (other, CH_TRIGGER, (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)), VOL_BASE, ATTEN_NORM);
+       _sound (other, (this.itemdef.instanceOfPowerup ? CH_TRIGGER_SINGLE : CH_TRIGGER), (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)), VOL_BASE, ATTEN_NORM);
 
        if (this.classname == "droppedweapon")
                remove (this);
@@ -863,8 +863,8 @@ void Item_Reset(entity this)
 }
 void Item_Reset_self() { SELFPARAM(); Item_Reset(this); }
 
-void Item_FindTeam()
-{SELFPARAM();
+void Item_FindTeam(entity this)
+{
        entity e;
 
        if(self.effects & EF_NODRAW)
@@ -1030,7 +1030,7 @@ float commodity_pickupevalfunc(entity player, entity item)
 void Item_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(ITEM_DAMAGE_NEEDKILL(deathtype))
-               WITH(entity, self, this, RemoveItem());
+               WITHSELF(this, RemoveItem());
 }
 
 void _StartItem(entity this, entity def, float defaultrespawntime, float defaultrespawntimejitter)
@@ -1135,7 +1135,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default
                        this.SendFlags |= ISF_SIZE;
                        // note droptofloor returns false if stuck/or would fall too far
                        if (!this.noalign)
-                               WITH(entity, self, this, droptofloor());
+                               WITHSELF(this, droptofloor());
                        waypoint_spawnforitem(this);
                }