X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Ft_items.qc;h=6025578a904b3f3c00b323ee8b456095fe7f8365;hp=04328de873f246593fe148514231adab3fe6821c;hb=06fc7068ee7c4795ad7b8dd6150ebf3481a10485;hpb=dde5c257558b5f4ed6aedb4ec2fedab9f4959d84;ds=sidebyside diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 04328de873..6025578a90 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -709,6 +709,19 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, } 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) @@ -815,35 +828,6 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, 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; @@ -877,8 +861,6 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, 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 @@ -1370,13 +1352,6 @@ void spawnfunc_target_items (void) 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");