{
if (ITEM_TOUCH_NEEDKILL())
{
- delete(this);
+ RemoveItem(this);
return;
}
}
void RemoveItem(entity this)
{
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);
}
if (Item_IsLoot(this))
{
- this.reset = SUB_Remove;
+ this.reset = RemoveItem;
set_movetype(this, MOVETYPE_TOSS);
// Savage: remove thrown items after a certain period of time ("garbage collection")
void Item_Reset(entity this);
void Item_FindTeam(entity this);
-// Savage: used for item garbage-collection
bool ItemSend(entity this, entity to, int sf);
void ItemUpdate(entity this);
void UpdateItemAfterTeleport(entity this);
+void RemoveItem(entity this);
+
// pickup evaluation functions
// these functions decide how desirable an item is to the bots