]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't allow magnet buff to pickup or capture flags, also fix item teaming potentially...
authorMario <mario@smbclan.net>
Tue, 30 Aug 2016 18:03:10 +0000 (04:03 +1000)
committerMario <mario@smbclan.net>
Tue, 30 Aug 2016 18:03:10 +0000 (04:03 +1000)
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/t_items.qc

index 73f6b63935f6999fc47cda077473659c5634220b..82fa2d33cb8bd0e0a649619e7836f95eefdfd9d6 100644 (file)
@@ -826,7 +826,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
        if(player.buffs & BUFF_MAGNET.m_itemid)
        {
                vector pickup_size;
-               IL_EACH(g_items, true,
+               IL_EACH(g_items, it.classname != "item_flag_team" && it.classname != "item_kh_key",
                {
                        if(it.buffs)
                                pickup_size = '1 1 1' * autocvar_g_buffs_magnet_range_buff;
index 8a44466785d1cfd8e6733d1d12948863c772bee8..f9f89a73fa6ec8a5da6bf70d62227079c8569d5d 100644 (file)
@@ -837,7 +837,7 @@ LABEL(pickup)
                        RandomSelection_Init();
                        IL_EACH(g_items, it.team == this.team,
                        {
-                               if(it.classname != "item_flag_team" && it.classname != "item_key_team")
+                               if(it.classname != "item_flag_team" && it.classname != "item_kh_key")
                                {
                                        Item_Show(it, -1);
                                        RandomSelection_Add(it, 0, string_null, it.cnt, 0);
@@ -881,7 +881,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_key_team")
+                       if(it.classname != "item_flag_team" && it.classname != "item_kh_key")
                                RandomSelection_Add(it, 0, string_null, it.cnt, 0);
                });
 
@@ -891,7 +891,7 @@ void Item_FindTeam(entity this)
 
                IL_EACH(g_items, it.team == this.team,
                {
-                       if(it.classname != "item_flag_team" && it.classname != "item_key_team")
+                       if(it.classname != "item_flag_team" && it.classname != "item_kh_key")
                        {
                                if(it != e)
                                {