}
.float max_armorvalue;
+.float pickup_anyway;
float Item_Customize()
{
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;
}
if (item.health)
- if (player.health < item.max_health)
+ if ((player.health < item.max_health) || item.pickup_anyway)
{
pickedup = TRUE;
player.health = min(player.health + item.health, item.max_health);
player.pauserothealth_finished = max(player.pauserothealth_finished, time + cvar("g_balance_pause_health_rot"));
}
if (item.armorvalue)
- if (player.armorvalue < item.max_armorvalue)
+ if ((player.armorvalue < item.max_armorvalue) || item.pickup_anyway)
{
pickedup = TRUE;
player.armorvalue = min(player.armorvalue + item.armorvalue, item.max_armorvalue);
{
startitem_failed = FALSE;
+ self.items = itemid;
+ self.weapons = weaponid;
+
// is it a dropped weapon?
if (self.classname == "droppedweapon")
{
}
else
{
+ 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
self.armorvalue = g_pickup_armorsmall;
if(!self.max_armorvalue)
self.max_armorvalue = g_pickup_armorsmall_max;
+ if(!self.pickup_anyway)
+ self.pickup_anyway = g_pickup_armorsmall_anyway;
StartItem ("models/items/g_a1.md3", "misc/armor1.wav", g_pickup_respawntime_short, g_pickup_respawntimejitter_short, "5 Armor", IT_ARMOR_SHARD, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
}
self.armorvalue = g_pickup_armormedium;
if(!self.max_armorvalue)
self.max_armorvalue = g_pickup_armormedium_max;
+ if(!self.pickup_anyway)
+ self.pickup_anyway = g_pickup_armormedium_anyway;
StartItem ("models/items/g_armormedium.md3", "misc/armor10.wav", g_pickup_respawntime_medium, g_pickup_respawntimejitter_medium, "25 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_MID);
}
self.armorvalue = g_pickup_armorbig;
if(!self.max_armorvalue)
self.max_armorvalue = g_pickup_armorbig_max;
+ if(!self.pickup_anyway)
+ self.pickup_anyway = g_pickup_armorbig_anyway;
StartItem ("models/items/g_a50.md3", "misc/armor17_5.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "50 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, 20000);
}
self.armorvalue = g_pickup_armorlarge;
if(!self.max_armorvalue)
self.max_armorvalue = g_pickup_armorlarge_max;
+ if(!self.pickup_anyway)
+ self.pickup_anyway = g_pickup_armorlarge_anyway;
StartItem ("models/items/g_a25.md3", "misc/armor25.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "100 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_HIGH);
}
self.max_health = g_pickup_healthsmall_max;
if(!self.health)
self.health = g_pickup_healthsmall;
+ if(!self.pickup_anyway)
+ self.pickup_anyway = g_pickup_healthsmall_anyway;
StartItem ("models/items/g_h1.md3", "misc/minihealth.wav", g_pickup_respawntime_short, g_pickup_respawntimejitter_short, "5 Health", IT_5HP, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
}
self.max_health = g_pickup_healthmedium_max;
if(!self.health)
self.health = g_pickup_healthmedium;
+ if(!self.pickup_anyway)
+ self.pickup_anyway = g_pickup_healthmedium_anyway;
StartItem ("models/items/g_h25.md3", "misc/mediumhealth.wav", g_pickup_respawntime_short, g_pickup_respawntimejitter_short, "25 Health", IT_25HP, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_MID);
}
self.max_health = g_pickup_healthlarge_max;
if(!self.health)
self.health = g_pickup_healthlarge;
+ if(!self.pickup_anyway)
+ self.pickup_anyway = g_pickup_healthlarge_anyway;
StartItem ("models/items/g_h50.md3", "misc/mediumhealth.wav", g_pickup_respawntime_medium, g_pickup_respawntimejitter_medium, "50 Health", IT_25HP, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_MID);
}
self.max_health = g_pickup_healthmega_max;
if(!self.health)
self.health = g_pickup_healthmega;
+ if(!self.pickup_anyway)
+ self.pickup_anyway = g_pickup_healthmega_anyway;
StartItem ("models/items/g_h100.md3", "misc/megahealth.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "100 Health", IT_HEALTH, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_HIGH);
}
}
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");
StartItem ("models/items/g_jetpack.md3", "misc/itempickup.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup, "Jet pack", IT_JETPACK, 0, FL_POWERUP, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
}
-// we no longer have the seeker
-void spawnfunc_weapon_seeker()
-{
- spawnfunc_weapon_fireball();
-}
-
#define OP_SET 0
#define OP_MIN 1
continue;
case "ALL":
got += GiveBit(e, items, IT_FUEL_REGEN, op, val);
- got += GiveValue(e, strength_finished, op, time + val);
- got += GiveValue(e, invincible_finished, op, time + val);
+ got += GiveValue(e, strength_finished, op, time);
+ got += GiveValue(e, invincible_finished, op, time);
got += GiveBit(e, items, IT_UNLIMITED_AMMO, op, val);
case "all":
got += GiveBit(e, items, IT_JETPACK, op, val);