]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/t_items.qc
Use a trick to prevent handling of items that aren't registered with .itemdef (should...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / t_items.qc
index 724f3f9ddb07be217742d432f6caccb0aa46d9c7..46ee92d906e93cc8dc3a5c30de4750a8f7061a09 100644 (file)
@@ -838,7 +838,7 @@ LABEL(pickup)
                        RandomSelection_Init();
                        IL_EACH(g_items, it.team == this.team,
                        {
-                               if(it.classname != "item_flag_team" && it.classname != "item_kh_key")
+                               if(it.itemdef) // is a registered item
                                {
                                        Item_Show(it, -1);
                                        RandomSelection_AddEnt(it, it.cnt, 0);
@@ -882,7 +882,7 @@ void Item_FindTeam(entity this)
                RandomSelection_Init();
                IL_EACH(g_items, it.team == this.team,
                {
-                       if(it.classname != "item_flag_team" && it.classname != "item_kh_key")
+                       if(it.itemdef) // is a registered item
                                RandomSelection_AddEnt(it, it.cnt, 0);
                });
 
@@ -892,7 +892,7 @@ void Item_FindTeam(entity this)
 
                IL_EACH(g_items, it.team == this.team,
                {
-                       if(it.classname != "item_flag_team" && it.classname != "item_kh_key")
+                       if(it.itemdef) // is a registered item
                        {
                                if(it != e)
                                {