void ItemRemove(entity this)
{
+ if(this.alpha)
+ if(!this.wait || time < this.wait - ticrate) // despawning loot items have their own effects
+ pointparticles(EFFECT_ITEM_PICKUP, (this.absmin + this.absmax) * 0.5, '0 0 0', 1);
strfree(this.mdl);
}
if(sf & ISF_STATUS) // need to read/write status first so model can handle simple, fb etc.
{
+ int prevItemStatus = this.ItemStatus;
this.ItemStatus = ReadByte();
if(this.ItemStatus & ITS_ALLOWFB)
if(this.ItemStatus & ITS_GLOW)
this.effects |= (EF_ADDITIVE | EF_FULLBRIGHT);
+ if(!(prevItemStatus & ITS_AVAILABLE) && this.alpha && !isnew)
+ pointparticles(EFFECT_ITEM_RESPAWN, (this.absmin + this.absmax) * 0.5, '0 0 0', 1);
}
else
{
if(this.ItemStatus & ITS_GLOW)
this.effects &= ~(EF_ADDITIVE | EF_FULLBRIGHT);
+ if(prevItemStatus & ITS_AVAILABLE && this.alpha)
+ pointparticles(EFFECT_ITEM_PICKUP, (this.absmin + this.absmax) * 0.5, '0 0 0', 1);
}
}
setthink(this, Item_Think);
this.nextthink = time;
-
- //Send_Effect(EFFECT_ITEM_RESPAWN, this.origin + this.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);
- Send_Effect(EFFECT_ITEM_RESPAWN, CENTER_OR_VIEWOFS(this), '0 0 0', 1);
}
void Item_RespawnCountdown(entity this)
STAT(LAST_PICKUP, toucher) = time;
- Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1);
GameItem def = this.itemdef;
int ch = ((def.instanceOfPowerup && def.m_itemid != IT_RESOURCE) ? CH_TRIGGER_SINGLE : CH_TRIGGER);
string snd = (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent));
if(wasfreed(this) || !this) { return; }
if(this.waypointsprite_attached)
WaypointSprite_Kill(this.waypointsprite_attached);
- Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1);
delete(this);
}