]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/keylock.qc
Combine `SELFCALL` and `SELFCALL_DONE` with `WITH`
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / keylock.qc
index 8d6d174cba48a346809473168192bf4773701fef..17313f0aa85de43dda806660633a4055dcf10a73 100644 (file)
@@ -3,7 +3,6 @@
  */
 void trigger_keylock_trigger(string s)
 {SELFPARAM();
-       entity stemp = self;
        entity otemp = other;
        entity atemp = activator;
 
@@ -11,13 +10,13 @@ void trigger_keylock_trigger(string s)
        for(t = world; (t = find(t, targetname, s)); )
                if(t.use)
                {
-                       self = t;
-                       other = stemp;
+                       setself(t);
+                       other = this;
                        activator = atemp;
                        self.use();
                }
 
-       self = stemp;
+       setself(this);
        other = otemp;
        activator = atemp;
 }