]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/button.qc
Add an argument to SetMovedir
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / button.qc
index 228b3f810aa5c3b62b91a8508cbd9a545ddcfcf4..0e2252130c381701fa2277947166093e7915f065 100644 (file)
@@ -44,7 +44,7 @@ void button_fire()
                return;
 
        if (self.noise != "")
-               sound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
+               _sound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
 
        self.state = STATE_UP;
        SUB_CalcMove (self.pos2, TSPEED_LINEAR, self.speed, button_wait);
@@ -112,9 +112,9 @@ When a button is touched, it moves some distance in the direction of it's angle,
 2) metallic click
 3) in-out
 */
-void spawnfunc_func_button()
-{SELFPARAM();
-       SetMovedir ();
+spawnfunc(func_button)
+{
+       SetMovedir(self);
 
        if (!InitMovingBrushTrigger())
                return;