]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/keylock.qc
Fix the use of self, activator and other globals in .use
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / keylock.qc
index 182650ed5bed4aa74625fd94f21534aab9aacd13..5b24b1b63f2848b23f143829f9bb18aa68157113 100644 (file)
@@ -3,22 +3,9 @@
  */
 void trigger_keylock_trigger(string s)
 {SELFPARAM();
-       entity otemp = other;
-       entity atemp = activator;
-
-       entity t;
-       for(t = world; (t = find(t, targetname, s)); )
-               if(t.use)
-               {
-                       setself(t);
-                       other = this;
-                       activator = atemp;
-                       self.use();
-               }
-
-       setself(this);
-       other = otemp;
-       activator = atemp;
+       for(entity t = world; (t = find(t, targetname, s)); )
+               if(t.use1)
+                       t.use1(t, NULL, this);
 }
 
 /**