}\r
else\r
{\r
- if(g_ghost_items)\r
+ if(g_ghost_items && self.respawntime > 0) // if respawntime is -1, this item does not respawn\r
{\r
self.colormod = stov(cvar_string("g_ghost_items_color"));\r
self.glowmod = self.colormod;\r
e.model = e.mdl;\r
e.solid = SOLID_TRIGGER;\r
e.colormod = '0 0 0';\r
- self.glowmod = self.colormod;\r
+ e.glowmod = e.colormod;\r
e.alpha = 0;\r
e.customizeentityforclient = func_null;\r
\r
e.model = string_null;\r
e.solid = SOLID_NOT;\r
e.colormod = '0 0 0';\r
- self.glowmod = self.colormod;\r
+ e.glowmod = e.colormod;\r
e.alpha = 0;\r
e.customizeentityforclient = func_null;\r
\r
e.model = e.mdl;\r
e.solid = SOLID_TRIGGER; // can STILL be picked up!\r
e.colormod = '0 0 0';\r
- self.glowmod = self.colormod;\r
+ e.glowmod = e.colormod;\r
e.effects |= EF_STARDUST;\r
e.customizeentityforclient = Item_Customize;\r
\r
e.spawnshieldtime = 0; // field indicates whether picking it up may give you anything other than the weapon\r
}\r
- else if(g_ghost_items)\r
+ else if(g_ghost_items && self.respawntime > 0) // if respawntime is -1, this item does not respawn\r
{\r
// make the item translucent green and not touchable\r
e.model = e.mdl;\r
e.solid = SOLID_NOT;\r
e.colormod = stov(cvar_string("g_ghost_items_color"));\r
- self.glowmod = self.colormod;\r
+ e.glowmod = e.colormod;\r
e.alpha = g_ghost_items;\r
e.customizeentityforclient = func_null;\r
\r
e.model = string_null;\r
e.solid = SOLID_NOT;\r
e.colormod = stov(cvar_string("g_ghost_items_color"));\r
- self.glowmod = self.colormod;\r
+ e.glowmod = e.colormod;\r
e.alpha = 0;\r
e.customizeentityforclient = func_null;\r
\r
void Item_ScheduleRespawn(entity e)\r
{\r
Item_Show(e, 0);\r
- Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e));\r
+ if(e.respawntime > 0) // if respawntime is -1, this item does not respawn\r
+ Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e));\r
}\r
\r
void Item_ScheduleInitialRespawn(entity e)\r
if(self.team)\r
self.flags |= FL_NO_WEAPON_STAY;\r
\r
+ if(g_weapon_stay == 2 && self.classname != "droppedweapon")\r
+ {\r
+ self.ammo_fuel = 0;\r
+ // weapon stay 2: don't use ammo on weapon pickups; instead\r
+ // initialize all ammo types to the pickup ammo unless set by g_start_ammo_*\r
+ }\r
+\r
StartItem(e.model, "weapons/weaponpickup.wav", self.respawntime, self.respawntimejitter, e.message, 0, e.weapons, FL_WEAPON, weapon_pickupevalfunc, e.bot_pickupbasevalue);\r
if (self.modelindex) // don't precache if self was removed\r
weapon_action(e.weapon, WR_PRECACHE);\r