]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_items.qc
Merge remote-tracking branch 'origin/master' into Mario/mutators
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_items.qc
index cb6700a2cfb60a3a5e2e289ff82761976dada93a..61e2a09bf8af6927a78273a74005ac1e26e67287 100644 (file)
@@ -277,10 +277,6 @@ float have_pickup_item(void)
                        return TRUE;
                if(autocvar_g_powerups == 0)
                        return FALSE;
-               if(g_ca)
-                       return FALSE;
-               if(g_arena)
-                       return FALSE;
        }
        else
        {
@@ -288,8 +284,6 @@ float have_pickup_item(void)
                        return TRUE;
                if(autocvar_g_pickup_items == 0)
                        return FALSE;
-               if(g_ca)
-                       return FALSE;
                if(g_weaponarena)
                        if(!WEPSET_EMPTY_E(self) || (self.items & IT_AMMO))
                                return FALSE;
@@ -651,11 +645,6 @@ float Item_GiveTo(entity item, entity player)
                pickedup = TRUE;
                player.superweapons_finished = max(player.superweapons_finished, time) + item.superweapons_finished;
        }
-       if (item.max_health)
-       {
-               pickedup = TRUE;
-               // extra life powerup handled by mutators
-       }
 
 :skip
        
@@ -695,8 +684,12 @@ void Item_Touch (void)
                return;
        if (self.owner == other)
                return;
-       if(MUTATOR_CALLHOOK(ItemTouch))
-               return;
+
+       switch(MUTATOR_CALLHOOK(ItemTouch))
+       {
+               case MUT_ITEMTOUCH_RETURN: { return; }
+               case MUT_ITEMTOUCH_PICKUP: { goto pickup; }
+       }
 
        if (self.classname == "droppedweapon")
        {
@@ -717,6 +710,8 @@ void Item_Touch (void)
                return;
        }
 
+       :pickup
+
        other.last_pickup = time;
 
        pointparticles(particleeffectnum("item_pickup"), self.origin, '0 0 0', 1);
@@ -1164,12 +1159,9 @@ void weapon_defaultspawnfunc(float wpn)
 
                if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
                {
-                       print("Attempted to spawn a mutator-blocked weapon; these guns will in the future require a mutator\n");
-                       /*
                        objerror("Attempted to spawn a mutator-blocked weapon rejected");
                        startitem_failed = TRUE;
                        return;
-                       */
                }
 
                s = W_Apply_Weaponreplace(e.netname);