]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix item filtering for powerups
authorRudolf Polzer <divverent@alientrap.org>
Wed, 21 Dec 2011 09:49:47 +0000 (10:49 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 21 Dec 2011 09:49:47 +0000 (10:49 +0100)
qcsrc/server/t_items.qc

index a43be3ff7dd63ee4d7b4a6e8fa66c1fb5da7d1df..e8775b64aa704740ed66ad39860affe7bbc903c7 100644 (file)
@@ -5,7 +5,7 @@ float have_pickup_item(void)
                if(self.classname != "minstagib")
                        return FALSE;
 
-       if(self.items == IT_STRENGTH || self.items == IT_INVINCIBLE)
+       if(self.flags & FL_POWERUP)
        {
                if(autocvar_g_powerups > 0)
                        return TRUE;
@@ -695,6 +695,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
 
        self.items = itemid;
        self.weapons = weaponid;
+       self.flags = FL_ITEM | itemflags;
 
        // is it a dropped weapon?
        if (self.classname == "droppedweapon")
@@ -811,7 +812,6 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
                self.respawntimejitter = defaultrespawntimejitter;
        }
        self.netname = itemname;
-       self.flags = FL_ITEM | itemflags;
        self.touch = Item_Touch;
        setmodel (self, self.mdl); // precision set below
        self.effects |= EF_LOWPRECISION;