Fix the placeholders %y, %l, %d (used in chat to find the nearest weapons/powerups...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_items.qc
index 537b5ef49388bc1b315d5fc8aa1fef2f1bb877b4..63e6a2b5284168a86ac26f236830262d6584fa6a 100644 (file)
@@ -837,7 +837,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
                else
                        precache_sound ("misc/itemrespawn.wav");
 
-               if((itemid & (IT_STRENGTH | IT_INVINCIBLE | IT_HEALTH | IT_ARMOR | IT_KEY1 | IT_KEY2)) || (weaponid & WEPBIT_ALL))
+               if((itemflags & (FL_POWERUP | FL_WEAPON)) || (itemid & (IT_HEALTH | IT_ARMOR | IT_KEY1 | IT_KEY2)))
                        self.target = "###item###"; // for finding the nearest item using find()
        }