X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Ft_items.qc;h=17fb9fce0cba011f19ed36f4bd5d0985199c5489;hp=af0c52e2345f76e0721e8b8732156179733ffbf8;hb=87bec07409c336c956a798556064c6819ad40a4d;hpb=05c1916e1f78c8233a0eb88b5f619d31ac5c9569 diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index af0c52e234..17fb9fce0c 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -183,7 +183,7 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew) if(this.ItemStatus & ITS_ALLOWFB) this.effects |= EF_FULLBRIGHT; - if(this.ItemStatus & ITS_POWERUP) + if(this.ItemStatus & ITS_GLOW) { if(this.ItemStatus & ITS_AVAILABLE) this.effects |= (EF_ADDITIVE | EF_FULLBRIGHT); @@ -423,6 +423,7 @@ void Item_Show (entity e, float mode) { e.effects &= ~(EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT | EF_NODEPTHTEST); e.ItemStatus &= ~ITS_STAYWEP; + entity def = e.itemdef; if (mode > 0) { // make the item look normal, and be touchable @@ -440,7 +441,6 @@ void Item_Show (entity e, float mode) e.ItemStatus &= ~ITS_AVAILABLE; } else { - entity def = e.itemdef; bool nostay = def.instanceOfWeaponPickup ? !!(def.m_weapon.weapons & WEPSET_SUPERWEAPONS) : false // no weapon-stay on superweapons || e.team // weapon stay isn't supported for teamed weapons ; @@ -463,8 +463,8 @@ void Item_Show (entity e, float mode) e.ItemStatus &= ~ITS_AVAILABLE; }} - if (e.items & ITEM_Strength.m_itemid || e.items & ITEM_Shield.m_itemid) - e.ItemStatus |= ITS_POWERUP; + if (def.m_glow) + e.ItemStatus |= ITS_GLOW; if (autocvar_g_nodepthtestitems) e.effects |= EF_NODEPTHTEST; @@ -497,13 +497,7 @@ void Item_ItemsTime_SetTimesForAllPlayers(); void Item_Respawn (entity this) { Item_Show(this, 1); - // this is ugly... - if(this.items == ITEM_Strength.m_itemid) - sound (this, CH_TRIGGER, SND_STRENGTH_RESPAWN, VOL_BASE, ATTEN_NORM); // play respawn sound - else if(this.items == ITEM_Shield.m_itemid) - sound (this, CH_TRIGGER, SND_SHIELD_RESPAWN, VOL_BASE, ATTEN_NORM); // play respawn sound - else - sound (this, CH_TRIGGER, SND_ITEMRESPAWN, VOL_BASE, ATTEN_NORM); // play respawn sound + sound(this, CH_TRIGGER, this.itemdef.m_respawnsound, VOL_BASE, ATTEN_NORM); // play respawn sound setorigin(this, this.origin); if (Item_ItemsTime_Allow(this.itemdef) || this.weapons & WEPSET_SUPERWEAPONS)