]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/buffs/buffs.qc
Further reduce magnet buff's range, also fix it
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / buffs / buffs.qc
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))
                        {
-                               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;
+                               }
                        }
                });
        }