]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/button.qc
Fix CTF flags secretly spamming squashed messages, and fix a potential crash in clien...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / button.qc
index a8ec50a86540a7be10fed5418c2bcd1b2b1786a3..916ff8ca1f1434c4f5053f995484df4bcb43cec2 100644 (file)
@@ -1,3 +1,4 @@
+#include "button.qh"
 #ifdef SVQC
 // button and multiple button
 
@@ -28,7 +29,7 @@ void button_return(entity this)
 }
 
 
-void button_blocked(entity this)
+void button_blocked(entity this, entity blocker)
 {
        // do nothing, just don't come all the way back out
 }
@@ -68,17 +69,17 @@ void button_use(entity this, entity actor, entity trigger)
        button_fire(this);
 }
 
-void button_touch(entity this)
+void button_touch(entity this, entity toucher)
 {
-       if (!other)
+       if (!toucher)
                return;
-       if (!other.iscreature)
+       if (!toucher.iscreature)
                return;
-       if(other.velocity * this.movedir < 0)
+       if(toucher.velocity * this.movedir < 0)
                return;
-       this.enemy = other;
-       if (other.owner)
-               this.enemy = other.owner;
+       this.enemy = toucher;
+       if (toucher.owner)
+               this.enemy = toucher.owner;
        button_fire (this);
 }