]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/button.qc
Merge branch 'master' into Mirio/balance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / button.qc
index e9ae0a5472042f24cfbada02a1ce52cdbd9fd07d..a1cabdc6c0326d2fa82bb766bfc1f5cd8c87abef 100644 (file)
@@ -9,8 +9,7 @@ void button_wait()
        self.state = STATE_TOP;
        self.SUB_NEXTTHINK = self.SUB_LTIME + self.wait;
        self.SUB_THINK = button_return;
-       activator = self.enemy;
-       SUB_UseTargets();
+       SUB_UseTargets(self, self.enemy, NULL);
        self.frame = 1;                 // use alternate textures
 }
 
@@ -60,13 +59,13 @@ void button_reset()
                self.takedamage = DAMAGE_YES;   // can be shot again
 }
 
-void button_use()
-{SELFPARAM();
-       if(self.active != ACTIVE_ACTIVE)
+void button_use(entity this, entity actor, entity trigger)
+{
+       if(this.active != ACTIVE_ACTIVE)
                return;
 
-       self.enemy = activator;
-       button_fire ();
+       this.enemy = actor;
+       WITHSELF(this, button_fire());
 }
 
 void button_touch()