From: MirceaKitsune Date: Wed, 8 Sep 2010 10:28:23 +0000 (+0300) Subject: Use remove() instead. No need to keep the disabled weapon entity as long as it won... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ec87ebe2b7f34df01d6d19284ef874c8dc53bd58;p=voretournament%2Fvoretournament.git Use remove() instead. No need to keep the disabled weapon entity as long as it won't respawn again. --- diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 5caed8e1..918347f5 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -46,7 +46,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; @@ -85,7 +85,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; @@ -97,7 +97,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; @@ -210,6 +210,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)