]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/relay_activators.qc
Merge branch 'master' into terencehill/translate_colors_2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / relay_activators.qc
index b765151fd123faa685786bb3f3f66b1b4730ecab..dabbbd2d96b05acad53b2ee499377b7dc6383d6a 100644 (file)
@@ -1,11 +1,10 @@
 #ifdef SVQC
-void relay_activators_use()
-{SELFPARAM();
+void relay_activators_use(entity this, entity actor, entity trigger)
+{
        for(entity trg = world; (trg = find(trg, targetname, this.target)); )
        {
-               setself(trg);
                if (trg.setactive)
-                       trg.setactive(this.cnt);
+                       trg.setactive(trg, this.cnt);
                else
                {
                        //bprint("Not using setactive\n");
@@ -18,24 +17,23 @@ void relay_activators_use()
                                trg.active = this.cnt;
                }
        }
-       setself(this);
 }
 
-void spawnfunc_relay_activate()
-{SELFPARAM();
-       self.cnt = ACTIVE_ACTIVE;
-       self.use = relay_activators_use;
+spawnfunc(relay_activate)
+{
+       this.cnt = ACTIVE_ACTIVE;
+       this.use = relay_activators_use;
 }
 
-void spawnfunc_relay_deactivate()
-{SELFPARAM();
-       self.cnt = ACTIVE_NOT;
-       self.use = relay_activators_use;
+spawnfunc(relay_deactivate)
+{
+       this.cnt = ACTIVE_NOT;
+       this.use = relay_activators_use;
 }
 
-void spawnfunc_relay_activatetoggle()
-{SELFPARAM();
-       self.cnt = ACTIVE_TOGGLE;
-       self.use = relay_activators_use;
+spawnfunc(relay_activatetoggle)
+{
+       this.cnt = ACTIVE_TOGGLE;
+       this.use = relay_activators_use;
 }
 #endif