From eaab80e2155970a208dee61a1291124869aee759 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Wed, 8 Sep 2010 13:25:56 +0300 Subject: [PATCH] Use remove() instead. No need to keep the disabled weapon entity as long as it won't respawn again. --- qcsrc/server/t_items.qc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index c71cc6ac7..f00369eb6 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -55,7 +55,7 @@ float Item_Customize() } else { - if(g_ghost_items && self.respawntime > 0) // if respawntime is -1, this item does not respawn + if(g_ghost_items) { self.colormod = stov(cvar_string("g_ghost_items_color")); self.glowmod = self.colormod; @@ -94,7 +94,7 @@ void Item_Show (entity e, float mode) e.spawnshieldtime = 1; } - else if((e.flags & FL_WEAPON) && (g_weapon_stay == 3 && self.respawntime > 0)) // if respawntime is -1, this item does not respawn + else if((e.flags & FL_WEAPON) && (g_weapon_stay == 3)) { // make the item translucent green and not touchable e.model = e.mdl; @@ -106,7 +106,7 @@ void Item_Show (entity e, float mode) e.spawnshieldtime = 0; // field indicates whether picking it up may give you anything other than the weapon } - else if(g_ghost_items && self.respawntime > 0) // if respawntime is -1, this item does not respawn + else if(g_ghost_items) { // make the item translucent green and not touchable e.model = e.mdl; @@ -236,6 +236,8 @@ void Item_ScheduleRespawn(entity e) Item_Show(e, 0); if(e.respawntime > 0) // if respawntime is -1, this item does not respawn Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e)); + else + remove(e); } void Item_ScheduleInitialRespawn(entity e) -- 2.39.2