]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Further reduce magnet buff's range, also fix it
authorMario <mario@smbclan.net>
Sat, 16 Jan 2016 10:50:52 +0000 (20:50 +1000)
committerMario <mario@smbclan.net>
Sat, 16 Jan 2016 10:50:52 +0000 (20:50 +1000)
mutators.cfg
qcsrc/common/mutators/mutator/buffs/buffs.qc

index 60f4c4c31437e2f299862ffdc4f80b36aad5c375..229d656f231c3f268999268e174ca1527d24abb7 100644 (file)
@@ -353,8 +353,8 @@ set g_buffs_swapper_time 60 "swapper buff carry time"
 set g_buffs_swapper_range 1500 "maximum range of swapping with enemy"
 set g_buffs_magnet 1 "magnet buff: greatly increased item pickup range"
 set g_buffs_magnet_time 60 "magnet buff carry time"
 set g_buffs_swapper_range 1500 "maximum range of swapping with enemy"
 set g_buffs_magnet 1 "magnet buff: greatly increased item pickup range"
 set g_buffs_magnet_time 60 "magnet buff carry time"
-set g_buffs_magnet_range_item 350 "range around player that items are automatically picked up (excludes other buffs)"
-set g_buffs_magnet_range_buff 200 "range around player that only buffs are picked up (drops magnet buff)"
+set g_buffs_magnet_range_item 250 "range around player that items are automatically picked up (excludes other buffs)"
+set g_buffs_magnet_range_buff 100 "range around player that only buffs are picked up (drops magnet buff)"
 
 
 // ==============
 
 
 // ==============
index 111490669b2f0bc233e5f61a7b073e2a97c65422..59f189c24a9c340b76d29caf7cf6341548e92f1a 100644 (file)
@@ -898,12 +898,14 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
 
                        if(boxesoverlap(self.absmin - pickup_size, self.absmax + pickup_size, it.absmin, it.absmax))
                        {
 
                        if(boxesoverlap(self.absmin - pickup_size, self.absmax + pickup_size, it.absmin, it.absmax))
                        {
-                               setself(other);
-                               other = this;
-                               if(self.touch)
-                                       self.touch();
-                               other = self;
-                               setself(this);
+                               if(it.touch)
+                               {
+                                       entity oldother = other;
+                                       other = self;
+                                       WITH(entity, self, it, it.touch());
+
+                                       other = oldother;
+                               }
                        }
                });
        }
                        }
                });
        }