if(self.weapons != (self.weapons & other.weapons))
{
self.colormod = '0 0 0';
- if(cvar("gameversion") >= 20600) // only do this for 2.6 and above FIXME remove this check when making 2.6
- self.glowmod = self.colormod;
+ self.glowmod = self.colormod;
self.alpha = 0.5 + 0.5 * g_ghost_items; // halfway more alpha
return TRUE;
}
if(g_ghost_items)
{
self.colormod = stov(cvar_string("g_ghost_items_color"));
- if(cvar("gameversion") >= 20600) // only do this for 2.6 and above FIXME remove this check when making 2.6
- self.glowmod = self.colormod;
+ self.glowmod = self.colormod;
self.alpha = g_ghost_items;
return TRUE;
}
e.model = e.mdl;
e.solid = SOLID_TRIGGER;
e.colormod = '0 0 0';
- if(cvar("gameversion") >= 20600) // only do this for 2.6 and above FIXME remove this check when making 2.6
- self.glowmod = self.colormod;
+ self.glowmod = self.colormod;
e.alpha = 0;
e.customizeentityforclient = func_null;
e.model = string_null;
e.solid = SOLID_NOT;
e.colormod = '0 0 0';
- if(cvar("gameversion") >= 20600) // only do this for 2.6 and above FIXME remove this check when making 2.6
- self.glowmod = self.colormod;
+ self.glowmod = self.colormod;
e.alpha = 0;
e.customizeentityforclient = func_null;
e.model = e.mdl;
e.solid = SOLID_TRIGGER; // can STILL be picked up!
e.colormod = '0 0 0';
- if(cvar("gameversion") >= 20600) // only do this for 2.6 and above FIXME remove this check when making 2.6
- self.glowmod = self.colormod;
+ self.glowmod = self.colormod;
e.effects |= EF_STARDUST;
e.customizeentityforclient = Item_Customize;
e.model = e.mdl;
e.solid = SOLID_NOT;
e.colormod = stov(cvar_string("g_ghost_items_color"));
- if(cvar("gameversion") >= 20600) // only do this for 2.6 and above FIXME remove this check when making 2.6
- self.glowmod = self.colormod;
+ self.glowmod = self.colormod;
e.alpha = g_ghost_items;
e.customizeentityforclient = func_null;
e.model = string_null;
e.solid = SOLID_NOT;
e.colormod = stov(cvar_string("g_ghost_items_color"));
- if(cvar("gameversion") >= 20600) // only do this for 2.6 and above FIXME remove this check when making 2.6
- self.glowmod = self.colormod;
+ self.glowmod = self.colormod;
e.alpha = 0;
e.customizeentityforclient = func_null;
}
else
{
+ self.items = itemid;
+ self.weapons = weaponid;
+
+ if(MUTATOR_CALLHOOK(FilterItem)) // error means we do not want the item
+ {
+ startitem_failed = TRUE;
+ remove(self);
+ return;
+ }
+
+ itemid = self.items;
+ weaponid = self.weapons;
+
self.reset = Item_Reset;
// it's a level item
if(self.spawnflags & 1)
return;
}
}
- else if (g_nixnex)
- {
- local float rm;
-
- rm = 1;
- switch (itemid)
- {
- case IT_HEALTH:
- case IT_5HP:
- case IT_25HP:
- case IT_ARMOR:
- case IT_ARMOR_SHARD:
- if (cvar("g_nixnex_with_healtharmor"))
- rm = 0;
- break;
- case IT_STRENGTH:
- case IT_INVINCIBLE:
- if (cvar("g_nixnex_with_powerups"))
- rm = 0;
- break;
- }
-
- if(rm)
- {
- startitem_failed = TRUE;
- remove (self);
- return;
- }
- }
else if (!cvar("g_pickup_items") && itemid != IT_STRENGTH && itemid != IT_INVINCIBLE && itemid != IT_HEALTH)
{
startitem_failed = TRUE;
self.respawntimejitter = defaultrespawntimejitter;
}
self.netname = itemname;
- self.items = itemid;
- self.weapons = weaponid;
self.flags = FL_ITEM | itemflags;
self.touch = Item_Touch;
setmodel (self, self.mdl); // precision set below
}
// support old misnamed entities
-void spawnfunc_item_armor1() { spawnfunc_item_armor_small(); } // FIXME: in Quake this is green armor, in Nexuiz maps it is an armor shard
+void spawnfunc_item_armor1() { spawnfunc_item_armor_small(); } // FIXME: in Quake this is green armor, in Xonotic maps it is an armor shard
void spawnfunc_item_armor25() { spawnfunc_item_armor_large(); }
void spawnfunc_item_health1() { spawnfunc_item_health_small(); }
void spawnfunc_item_health25() { spawnfunc_item_health_medium(); }
float n, i, j;
entity e;
- if(g_nixnex)
- {
- // items triggers cannot work in nixnex (as they change weapons/ammo)
- remove(self);
- return;
- }
-
self.use = target_items_use;
if(!self.strength_finished)
self.strength_finished = cvar("g_balance_powerup_strength_time");